- protected:
- static bool _build_missing_peakfiles;
- static bool _build_peakfiles;
-
- string _name;
- uint32_t _use_cnt;
- bool _peaks_built;
- mutable Glib::Mutex _lock;
- jack_nframes_t _length;
- bool next_peak_clear_should_notify;
- string peakpath;
- time_t _timestamp;
- string _captured_for;
-
- mutable uint32_t _read_data_count; // modified in read()
- mutable uint32_t _write_data_count; // modified in write()
-
- int initialize_peakfile (bool newfile, string path);
- void build_peaks_from_scratch ();
-
- int do_build_peak (jack_nframes_t, jack_nframes_t);
- virtual jack_nframes_t read_unlocked (Sample *dst, jack_nframes_t start, jack_nframes_t cnt, char * workbuf) const = 0;
- virtual string peak_path(string audio_path) = 0;
-
- static pthread_t peak_thread;
- static bool have_peak_thread;
- static void* peak_thread_work(void*);
-
- static int peak_request_pipe[2];
-
- struct PeakRequest {
- enum Type {
- Build,
- Quit
- };
- };