- 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) const = 0;
- virtual jack_nframes_t write_unlocked (Sample *dst, jack_nframes_t cnt) = 0;
- virtual string peak_path(string audio_path) = 0;
- virtual string old_peak_path(string audio_path) = 0;
-
- void update_length (jack_nframes_t pos, jack_nframes_t cnt);
-
- static pthread_t peak_thread;
- static bool have_peak_thread;
- static void* peak_thread_work(void*);
-
- static int peak_request_pipe[2];
+ int initialize_peakfile (bool newfile, std::string path);
+ int build_peaks_from_scratch ();
+ int compute_and_write_peaks (Sample* buf, framecnt_t first_frame, framecnt_t cnt,
+ bool force, bool intermediate_peaks_ready_signal);
+ void truncate_peakfile();