29 #include <glibmm/threads.h>
78 _build_missing_peakfiles = yn;
82 _build_peakfiles = yn;
86 return _build_peakfiles;
117 bool force,
bool intermediate_peaks_ready_signal);
124 virtual std::string
construct_peak_filepath (
const std::string& audio_path,
const bool in_session =
false,
const bool old_peak_name =
false)
const = 0;
128 double samples_per_visual_peak,
samplecnt_t fpp)
const;
131 bool force,
bool intermediate_peaks_ready_signal,
virtual void mark_streaming_write_completed(const WriterLock &lock, Temporal::timecnt_t const &duration)
bool peaks_ready(std::function< void()> callWhenReady, PBD::ScopedConnection **connection_created_if_not_ready, PBD::EventLoop *event_loop) const
virtual samplecnt_t read_unlocked(Sample *dst, samplepos_t start, samplecnt_t cnt) const =0
int compute_and_write_peaks(Sample const *buf, samplecnt_t first_sample, samplecnt_t cnt, bool force, bool intermediate_peaks_ready_signal)
samplecnt_t peak_leftover_cnt
static void set_build_missing_peakfiles(bool yn)
XMLNode & get_state() const
int set_state(const XMLNode &, int version)
virtual samplecnt_t read(Sample *dst, samplepos_t start, samplecnt_t cnt, int channel=0) const
static void set_build_peakfiles(bool yn)
int prepare_for_peakfile_writes()
AudioSource(Session &, const XMLNode &)
int read_peaks(PeakData *peaks, samplecnt_t npeaks, samplepos_t start, samplecnt_t cnt, double samples_per_visual_peak) const
static bool get_build_peakfiles()
PBD::Signal< void()> PeaksReady
virtual std::string construct_peak_filepath(const std::string &audio_path, const bool in_session=false, const bool old_peak_name=false) const =0
virtual samplecnt_t available_peaks(double zoom) const
int rename_peakfile(std::string newpath)
int build_peaks_from_scratch()
Glib::Threads::Mutex _initialize_peaks_lock
static std::vector< std::shared_ptr< Sample[]> > _mixdown_buffers
size_t _last_raw_map_length
samplecnt_t readable_length_samples() const
static Glib::Threads::Mutex _level_buffer_lock
PBD::Signal< void(samplepos_t, samplepos_t)> PeakRangeReady
Glib::Threads::Mutex _peaks_ready_lock
virtual bool can_truncate_peaks() const
virtual int setup_peakfile()
virtual bool clamped_at_unity() const =0
void update_length(timepos_t const &dur)
int initialize_peakfile(const std::string &path, const bool in_session=false)
void done_with_peakfile_writes(bool done=true)
static std::vector< std::shared_ptr< gain_t[]> > _gain_buffers
static bool _build_missing_peakfiles
samplepos_t peak_leftover_sample
virtual uint32_t n_channels() const
AudioSource(Session &, const std::string &name)
virtual int read_peaks_with_fpp(PeakData *peaks, samplecnt_t npeaks, samplepos_t start, samplecnt_t cnt, double samples_per_visual_peak, samplecnt_t fpp) const
std::unique_ptr< PeakData[]> peak_cache
int compute_and_write_peaks(Sample const *buf, samplecnt_t first_sample, samplecnt_t cnt, bool force, bool intermediate_peaks_ready_signal, samplecnt_t samples_per_peak)
samplecnt_t peak_leftover_size
virtual samplecnt_t write_unlocked(Sample const *dst, samplecnt_t cnt)=0
virtual samplecnt_t write(Sample const *src, samplecnt_t cnt)
virtual float sample_rate() const =0
static bool _build_peakfiles
Glib::Threads::RWLock::WriterLock WriterLock
GtkImageIconNameData name
void peaks(const float *data, float &min, float &max, uint32_t n_samples)
PBD::PropertyDescriptor< timepos_t > start
Temporal::samplecnt_t samplecnt_t
Temporal::samplepos_t samplepos_t