diff options
Diffstat (limited to 'libs/ardour/ardour/resampled_source.h')
-rw-r--r-- | libs/ardour/ardour/resampled_source.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libs/ardour/ardour/resampled_source.h b/libs/ardour/ardour/resampled_source.h index 8ca56b52d3..6eca4cda98 100644 --- a/libs/ardour/ardour/resampled_source.h +++ b/libs/ardour/ardour/resampled_source.h @@ -30,18 +30,21 @@ namespace ARDOUR { class ResampledImportableSource : public ImportableSource { public: - ResampledImportableSource (const std::string& path, - nframes_t rate, SrcQuality); + ResampledImportableSource (boost::shared_ptr<ImportableSource>, nframes_t rate, SrcQuality); ~ResampledImportableSource (); nframes_t read (Sample* buffer, nframes_t nframes); - float ratio() const { return src_data.src_ratio; } + uint32_t channels() const { return source->channels(); } + nframes_t length() const { return source->length(); } + nframes_t samplerate() const { return source->samplerate(); } + void seek (nframes_t pos) { source->seek (pos); } static const uint32_t blocksize; private: + boost::shared_ptr<ImportableSource> source; float* input; SRC_STATE* src_state; SRC_DATA src_data; |