summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/AudioResamplerDyn.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'services/audioflinger/AudioResamplerDyn.cpp')
-rw-r--r--services/audioflinger/AudioResamplerDyn.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/services/audioflinger/AudioResamplerDyn.cpp b/services/audioflinger/AudioResamplerDyn.cpp
index 0eeb201..6481b85 100644
--- a/services/audioflinger/AudioResamplerDyn.cpp
+++ b/services/audioflinger/AudioResamplerDyn.cpp
@@ -477,15 +477,15 @@ void AudioResamplerDyn<TC, TI, TO>::setSampleRate(int32_t inSampleRate)
}
template<typename TC, typename TI, typename TO>
-void AudioResamplerDyn<TC, TI, TO>::resample(int32_t* out, size_t outFrameCount,
+size_t AudioResamplerDyn<TC, TI, TO>::resample(int32_t* out, size_t outFrameCount,
AudioBufferProvider* provider)
{
- (this->*mResampleFunc)(reinterpret_cast<TO*>(out), outFrameCount, provider);
+ return (this->*mResampleFunc)(reinterpret_cast<TO*>(out), outFrameCount, provider);
}
template<typename TC, typename TI, typename TO>
template<int CHANNELS, bool LOCKED, int STRIDE>
-void AudioResamplerDyn<TC, TI, TO>::resample(TO* out, size_t outFrameCount,
+size_t AudioResamplerDyn<TC, TI, TO>::resample(TO* out, size_t outFrameCount,
AudioBufferProvider* provider)
{
// TODO Mono -> Mono is not supported. OUTPUT_CHANNELS reflects minimum of stereo out.
@@ -610,6 +610,7 @@ resample_exit:
ALOG_ASSERT(mBuffer.frameCount == 0); // there must be no frames in the buffer
mInBuffer.setImpulse(impulse);
mPhaseFraction = phaseFraction;
+ return outputIndex / OUTPUT_CHANNELS;
}
/* instantiate templates used by AudioResampler::create */
@@ -618,4 +619,4 @@ template class AudioResamplerDyn<int16_t, int16_t, int32_t>;
template class AudioResamplerDyn<int32_t, int16_t, int32_t>;
// ----------------------------------------------------------------------------
-}; // namespace android
+} // namespace android