Mercurial > hg > svcore
changeset 1322:e939a365e4d2 3.0-integration
Merge from branch bqresample
author | Chris Cannam |
---|---|
date | Fri, 09 Dec 2016 18:01:55 +0000 |
parents | 983667969a82 (current diff) ca43c4b7719c (diff) |
children | 4dbb7a7c9c28 |
files | |
diffstat | 2 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/base/AudioPlaySource.h Fri Dec 09 10:24:40 2016 +0000 +++ b/base/AudioPlaySource.h Fri Dec 09 18:01:55 2016 +0000 @@ -70,11 +70,16 @@ virtual sv_samplerate_t getSourceSampleRate() const = 0; /** - * Return the sample rate set by the target audio device (or the - * source sample rate if the target hasn't set one). If the - * source and target sample rates differ, resampling will occur. + * Return the sample rate set by the target audio device (or 0 if + * the target hasn't told us yet). If the source and target + * sample rates differ, resampling will occur. + * + * Note that we don't actually do any processing at the device + * sample rate. All processing happens at the source sample rate, + * and then a resampler is applied if necessary at the interface + * between application and driver layer. */ - virtual sv_samplerate_t getTargetSampleRate() const = 0; + virtual sv_samplerate_t getDeviceSampleRate() const = 0; /** * Get the block size of the target audio device. This may be an
--- a/transform/ModelTransformerFactory.cpp Fri Dec 09 10:24:40 2016 +0000 +++ b/transform/ModelTransformerFactory.cpp Fri Dec 09 18:01:55 2016 +0000 @@ -103,7 +103,7 @@ int blockSize = 1024; int channels = 1; if (source) { - sampleRate = source->getTargetSampleRate(); + sampleRate = source->getSourceSampleRate(); blockSize = source->getTargetBlockSize(); channels = source->getTargetChannelCount(); }