#define __ardour_audio_source_h__
#include <boost/shared_ptr.hpp>
+#include <boost/shared_array.hpp>
#include <boost/enable_shared_from_this.hpp>
#include <time.h>
-#include <glibmm/thread.h>
+#include <glibmm/threads.h>
#include <boost/function.hpp>
#include "ardour/source.h"
virtual bool empty() const;
framecnt_t length (framepos_t pos) const;
- void update_length (framepos_t pos, framecnt_t cnt);
+ void update_length (framecnt_t cnt);
virtual framecnt_t available_peaks (double zoom) const;
void set_captured_for (std::string str) { _captured_for = str; }
std::string captured_for() const { return _captured_for; }
- uint32_t read_data_count() const { return _read_data_count; }
- uint32_t write_data_count() const { return _write_data_count; }
- void dec_read_data_count (framecnt_t);
-
int read_peaks (PeakData *peaks, framecnt_t npeaks,
framepos_t start, framecnt_t cnt, double samples_per_visual_peak) const;
thread, or a lock around calls that use them.
*/
- static std::vector<boost::shared_ptr<Sample> > _mixdown_buffers;
- static std::vector<boost::shared_ptr<gain_t> > _gain_buffers;
- static Glib::StaticMutex _level_buffer_lock;
+ static std::vector<boost::shared_array<Sample> > _mixdown_buffers;
+ static std::vector<boost::shared_array<gain_t> > _gain_buffers;
+ static Glib::Threads::Mutex _level_buffer_lock;
static void ensure_buffers_for_level (uint32_t, framecnt_t);
static void ensure_buffers_for_level_locked (uint32_t, framecnt_t);
std::string peakpath;
std::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, std::string path);
+ int initialize_peakfile (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);
* PeaksReady means that _peaks_built cannot be changed
* during the handling of the signal.
*/
- mutable Glib::Mutex _peaks_ready_lock;
+ mutable Glib::Threads::Mutex _peaks_ready_lock;
PBD::FdFileDescriptor* _peakfile_descriptor;
int _peakfile_fd;