summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/resampled_source.h
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-04-09 14:11:47 +0000
committerCarl Hetherington <carl@carlh.net>2010-04-09 14:11:47 +0000
commitf4ac9430f3fc2c405334f3f02fe08a5782454396 (patch)
tree2858264db409fc1bfe778554f86100f01c1f0b3d /libs/ardour/ardour/resampled_source.h
parent77c09fc8248160ab60e2e229710d07934fe08894 (diff)
Prevent clipping during the import of files from sources that have
amplitudes greater than 1 when data is being stored in files that are clamped. e.g. when importing hot sources and resampling them when the session file format is integer. git-svn-id: svn://localhost/ardour2/branches/3.0@6879 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/resampled_source.h')
-rw-r--r--libs/ardour/ardour/resampled_source.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/libs/ardour/ardour/resampled_source.h b/libs/ardour/ardour/resampled_source.h
index efa1458152..b61303b65c 100644
--- a/libs/ardour/ardour/resampled_source.h
+++ b/libs/ardour/ardour/resampled_source.h
@@ -39,14 +39,20 @@ class ResampledImportableSource : public ImportableSource
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); }
+ void seek (nframes_t);
nframes64_t natural_position() const { return source->natural_position(); }
+ bool clamped_at_unity () const {
+ /* resampling may generate inter-sample peaks with magnitude > 1 */
+ return false;
+ }
+
static const uint32_t blocksize;
private:
boost::shared_ptr<ImportableSource> source;
float* input;
+ int _src_type;
SRC_STATE* src_state;
SRC_DATA src_data;
};