summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/audiosource.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/ardour/audiosource.h')
-rw-r--r--libs/ardour/ardour/audiosource.h33
1 files changed, 17 insertions, 16 deletions
diff --git a/libs/ardour/ardour/audiosource.h b/libs/ardour/ardour/audiosource.h
index d598e424ac..d2d23bcfab 100644
--- a/libs/ardour/ardour/audiosource.h
+++ b/libs/ardour/ardour/audiosource.h
@@ -42,7 +42,7 @@ using std::string;
namespace ARDOUR {
-const jack_nframes_t frames_per_peak = 256;
+const nframes_t frames_per_peak = 256;
class AudioSource : public Source
{
@@ -56,18 +56,18 @@ class AudioSource : public Source
so its here in AudioSource for now.
*/
- virtual jack_nframes_t natural_position() const { return 0; }
+ virtual nframes_t natural_position() const { return 0; }
/* returns the number of items in this `audio_source' */
- virtual jack_nframes_t length() const {
+ virtual nframes_t length() const {
return _length;
}
- virtual jack_nframes_t available_peaks (double zoom) const;
+ virtual nframes_t available_peaks (double zoom) const;
- virtual jack_nframes_t read (Sample *dst, jack_nframes_t start, jack_nframes_t cnt) const;
- virtual jack_nframes_t write (Sample *src, jack_nframes_t cnt);
+ virtual nframes_t read (Sample *dst, nframes_t start, nframes_t cnt) const;
+ virtual nframes_t write (Sample *src, nframes_t cnt);
virtual float sample_rate () const = 0;
@@ -80,12 +80,12 @@ class AudioSource : public Source
uint32_t read_data_count() const { return _read_data_count; }
uint32_t write_data_count() const { return _write_data_count; }
- int read_peaks (PeakData *peaks, jack_nframes_t npeaks, jack_nframes_t start, jack_nframes_t cnt, double samples_per_unit) const;
+ int read_peaks (PeakData *peaks, nframes_t npeaks, nframes_t start, nframes_t cnt, double samples_per_unit) const;
int build_peaks ();
bool peaks_ready (sigc::slot<void>, sigc::connection&) const;
mutable sigc::signal<void> PeaksReady;
- mutable sigc::signal<void,jack_nframes_t,jack_nframes_t> PeakRangeReady;
+ mutable sigc::signal<void,nframes_t,nframes_t> PeakRangeReady;
XMLNode& get_state ();
int set_state (const XMLNode&);
@@ -94,6 +94,7 @@ class AudioSource : public Source
static void stop_peak_thread ();
int rename_peakfile (std::string newpath);
+ void touch_peakfile ();
static void set_build_missing_peakfiles (bool yn) {
_build_missing_peakfiles = yn;
@@ -109,7 +110,7 @@ class AudioSource : public Source
bool _peaks_built;
mutable Glib::Mutex _lock;
- jack_nframes_t _length;
+ nframes_t _length;
bool next_peak_clear_should_notify;
string peakpath;
string _captured_for;
@@ -120,14 +121,14 @@ class AudioSource : public Source
int initialize_peakfile (bool newfile, string path);
void build_peaks_from_scratch ();
- int do_build_peak (jack_nframes_t, jack_nframes_t);
+ int do_build_peak (nframes_t, 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 nframes_t read_unlocked (Sample *dst, nframes_t start, nframes_t cnt) const = 0;
+ virtual nframes_t write_unlocked (Sample *dst, 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);
+ void update_length (nframes_t pos, nframes_t cnt);
static pthread_t peak_thread;
static bool have_peak_thread;
@@ -149,10 +150,10 @@ class AudioSource : public Source
static void clear_queue_for_peaks ();
struct PeakBuildRecord {
- jack_nframes_t frame;
- jack_nframes_t cnt;
+ nframes_t frame;
+ nframes_t cnt;
- PeakBuildRecord (jack_nframes_t f, jack_nframes_t c)
+ PeakBuildRecord (nframes_t f, nframes_t c)
: frame (f), cnt (c) {}
PeakBuildRecord (const PeakBuildRecord& other) {
frame = other.frame;