summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/audiosource.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-02-19 05:45:11 +0000
committerDavid Robillard <d@drobilla.net>2009-02-19 05:45:11 +0000
commit8a28ea6154f78d491afe746b3a2b0230185afb91 (patch)
tree35c6b974624bbfc41297dfd08a068585545cf9a0 /libs/ardour/ardour/audiosource.h
parent0f71728a925eb8f16c14c74f0dae9fdd53406a20 (diff)
Introduce new time for session-relative frame time, and make source interface capable of handling 64-bit long sessions.
sframes_t is "session frames". The rules for time stamps are: - Anything relative to transport time, session position, etc, should be sframes_t - Anything relative to jack cycles, including the length thereof, should be nframes_t To support sessions which exceed UINT32_MAX frames, we need to replace all the uses of nframes_t for session time with sframes_t, and make sure the conversions are sound. This does not depend on jack's nframes_t; that we are using the same type at all right now was an oops. This is also be kinda nice for readability since the two different time bases have different types... git-svn-id: svn://localhost/ardour2/branches/3.0@4636 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/audiosource.h')
-rw-r--r--libs/ardour/ardour/audiosource.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/libs/ardour/ardour/audiosource.h b/libs/ardour/ardour/audiosource.h
index 740d9bc7c4..0ed621c6ac 100644
--- a/libs/ardour/ardour/audiosource.h
+++ b/libs/ardour/ardour/audiosource.h
@@ -65,7 +65,7 @@ class AudioSource : virtual public Source,
return read (dst, (nframes_t) start, (nframes_t) cnt);
}
- virtual nframes_t read (Sample *dst, nframes_t start, nframes_t cnt) const;
+ virtual nframes_t read (Sample *dst, sframes_t start, nframes_t cnt) const;
virtual nframes_t write (Sample *src, nframes_t cnt);
virtual float sample_rate () const = 0;
@@ -81,7 +81,7 @@ class AudioSource : virtual public Source,
uint32_t write_data_count() const { return _write_data_count; }
int read_peaks (PeakData *peaks, nframes_t npeaks,
- nframes_t start, nframes_t cnt, double samples_per_visual_peak) const;
+ sframes_t start, nframes_t cnt, double samples_per_visual_peak) const;
int build_peaks ();
bool peaks_ready (sigc::slot<void>, sigc::connection&) const;
@@ -126,23 +126,23 @@ class AudioSource : virtual public Source,
int initialize_peakfile (bool newfile, Glib::ustring path);
int build_peaks_from_scratch ();
- int compute_and_write_peaks (Sample* buf, nframes_t first_frame, nframes_t cnt,
+ int compute_and_write_peaks (Sample* buf, sframes_t first_frame, nframes_t cnt,
bool force, bool intermediate_peaks_ready_signal);
void truncate_peakfile();
mutable off_t _peak_byte_max; // modified in compute_and_write_peak()
- virtual nframes_t read_unlocked (Sample *dst, nframes_t start, nframes_t cnt) const = 0;
+ virtual nframes_t read_unlocked (Sample *dst, sframes_t start, nframes_t cnt) const = 0;
virtual nframes_t write_unlocked (Sample *dst, nframes_t cnt) = 0;
virtual Glib::ustring peak_path(Glib::ustring audio_path) = 0;
virtual Glib::ustring find_broken_peakfile (Glib::ustring missing_peak_path,
Glib::ustring audio_path) = 0;
virtual int read_peaks_with_fpp (PeakData *peaks,
- nframes_t npeaks, nframes_t start, nframes_t cnt,
+ nframes_t npeaks, sframes_t start, nframes_t cnt,
double samples_per_visual_peak, nframes_t fpp) const;
- int compute_and_write_peaks (Sample* buf, nframes_t first_frame, nframes_t cnt,
+ int compute_and_write_peaks (Sample* buf, sframes_t first_frame, nframes_t cnt,
bool force, bool intermediate_peaks_ready_signal, nframes_t frames_per_peak);
private: