# HG changeset patch # User Chris Cannam # Date 1481306515 0 # Node ID e939a365e4d21169464274df3e66f929854e0942 # Parent 983667969a82e28d6d1a3d45491915e5b05a9f32# Parent ca43c4b7719c2e0bbf6b9af47a4fa48c26754fff Merge from branch bqresample diff -r 983667969a82 -r e939a365e4d2 base/AudioPlaySource.h --- 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 diff -r 983667969a82 -r e939a365e4d2 transform/ModelTransformerFactory.cpp --- 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(); }