+ private:
+ bool _peaks_built;
+ /** This mutex is used to protect both the _peaks_built
+ * variable and also the emission (and handling) of the
+ * PeaksReady signal. Holding the lock when emitting
+ * PeaksReady means that _peaks_built cannot be changed
+ * during the handling of the signal.
+ */
+ mutable Glib::Threads::Mutex _peaks_ready_lock;
+ Glib::Threads::Mutex _initialize_peaks_lock;
+
+ int _peakfile_fd;
+ samplecnt_t peak_leftover_cnt;
+ samplecnt_t peak_leftover_size;
+ Sample* peak_leftovers;
+ samplepos_t peak_leftover_sample;
+
+ mutable bool _first_run;
+ mutable double _last_scale;
+ mutable off_t _last_map_off;
+ mutable size_t _last_raw_map_length;
+ mutable boost::scoped_array<PeakData> peak_cache;