+
+ double samplerate = _decoder->get_samplerate();
+
+ // Show sample rate as 1Hz when it is unknown
+ if (samplerate == 0.0)
+ samplerate = 1.0;
+
+ const double pixels_offset = (_view->offset() -
+ _decoder->get_start_time()) / scale;
+ const double samples_per_pixel = samplerate * scale;
+
+ assert(_decoder);
+ vector< shared_ptr<Annotation> > annotations(_decoder->annotations());
+ BOOST_FOREACH(shared_ptr<Annotation> a, annotations) {
+ assert(a);
+ a->paint(p, left, right, samples_per_pixel, pixels_offset, y);
+ }