diff options
author | David Robillard <d@drobilla.net> | 2008-02-02 03:57:35 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-02-02 03:57:35 +0000 |
commit | 9f63ab9931e6478472853bdda58da47ea29ac125 (patch) | |
tree | 7edfb1d16f580e93501c24fa9f9648fe415f3745 /libs/ardour/ardour/audiosource.h | |
parent | 85ea9028b52eefb34184deb0fbd4d3c7632a2c38 (diff) |
Merge with trunk R2978.
git-svn-id: svn://localhost/ardour2/branches/3.0@2988 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/audiosource.h')
-rw-r--r-- | libs/ardour/ardour/audiosource.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/libs/ardour/ardour/audiosource.h b/libs/ardour/ardour/audiosource.h index 93708a5b07..b11174abe8 100644 --- a/libs/ardour/ardour/audiosource.h +++ b/libs/ardour/ardour/audiosource.h @@ -50,10 +50,20 @@ class AudioSource : public Source, public boost::enable_shared_from_this<ARDOUR: AudioSource (Session&, const XMLNode&); virtual ~AudioSource (); - /* returns the number of items in this `audio_source' */ + nframes64_t readable_length() const { return _length; } + uint32_t n_channels() const { return 1; } virtual nframes_t available_peaks (double zoom) const; + /* stopgap until nframes_t becomes nframes64_t. this function is needed by the Readable interface */ + + virtual nframes64_t read (Sample *dst, nframes64_t start, nframes64_t cnt, int channel) const { + /* XXX currently ignores channel, assuming that source is always mono, which + historically has been true. + */ + 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 write (Sample *src, nframes_t cnt); @@ -101,6 +111,9 @@ class AudioSource : public Source, public boost::enable_shared_from_this<ARDOUR: int prepare_for_peakfile_writes (); void done_with_peakfile_writes (bool done = true); + std::vector<nframes64_t> transients; + std::string get_transients_path() const; + protected: static bool _build_missing_peakfiles; static bool _build_peakfiles; @@ -134,6 +147,8 @@ class AudioSource : public Source, public boost::enable_shared_from_this<ARDOUR: int compute_and_write_peaks (Sample* buf, nframes_t first_frame, nframes_t cnt, bool force, bool intermediate_peaks_ready_signal, nframes_t frames_per_peak); + int load_transients (const std::string&); + private: int peakfile; nframes_t peak_leftover_cnt; |