diff options
author | Andy Hung <hunga@google.com> | 2015-03-29 00:49:22 -0700 |
---|---|---|
committer | Andy Hung <hunga@google.com> | 2015-04-08 14:31:58 -0700 |
commit | 6b3b7e304e0f8f167241b2c75f1eb04a9ef192ec (patch) | |
tree | 1cec011ad26676dc9dc3eea778e18136c083e04f /services/audioflinger/AudioResamplerCubic.h | |
parent | 25f82752942b1c78aec8ee303d61afff85cff9d1 (diff) | |
download | frameworks_av-6b3b7e304e0f8f167241b2c75f1eb04a9ef192ec.zip frameworks_av-6b3b7e304e0f8f167241b2c75f1eb04a9ef192ec.tar.gz frameworks_av-6b3b7e304e0f8f167241b2c75f1eb04a9ef192ec.tar.bz2 |
Return number of frames output from resample method
Change-Id: Ic297e2ed59839f1788c83e099ef1a9e4af29591f
Diffstat (limited to 'services/audioflinger/AudioResamplerCubic.h')
-rw-r--r-- | services/audioflinger/AudioResamplerCubic.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/services/audioflinger/AudioResamplerCubic.h b/services/audioflinger/AudioResamplerCubic.h index 1ddc5f9..4b45b0b 100644 --- a/services/audioflinger/AudioResamplerCubic.h +++ b/services/audioflinger/AudioResamplerCubic.h @@ -31,7 +31,7 @@ public: AudioResamplerCubic(int inChannelCount, int32_t sampleRate) : AudioResampler(inChannelCount, sampleRate, MED_QUALITY) { } - virtual void resample(int32_t* out, size_t outFrameCount, + virtual size_t resample(int32_t* out, size_t outFrameCount, AudioBufferProvider* provider); private: // number of bits used in interpolation multiply - 14 bits avoids overflow @@ -43,9 +43,9 @@ private: int32_t a, b, c, y0, y1, y2, y3; } state; void init(); - void resampleMono16(int32_t* out, size_t outFrameCount, + size_t resampleMono16(int32_t* out, size_t outFrameCount, AudioBufferProvider* provider); - void resampleStereo16(int32_t* out, size_t outFrameCount, + size_t resampleStereo16(int32_t* out, size_t outFrameCount, AudioBufferProvider* provider); static inline int32_t interp(state* p, int32_t x) { return (((((p->a * x >> 14) + p->b) * x >> 14) + p->c) * x >> 14) + p->y1; |