From 0d585c85524eb5d398fadff5ca8dd43939ed9cb4 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Sat, 10 Nov 2012 03:26:39 -0800 Subject: refactor code to improve neon code we want to make sure we don't transfer data from the neon unit to the arm register file, as this can be quite slow. instead we do all the calculation on the neon side and write the result directly to main memory. Change-Id: Ibb56664d3ab03098ae2798b75e2b6927ac900187 --- services/audioflinger/AudioResamplerSinc.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'services/audioflinger/AudioResamplerSinc.h') diff --git a/services/audioflinger/AudioResamplerSinc.h b/services/audioflinger/AudioResamplerSinc.h index 1b14019..96c31ee 100644 --- a/services/audioflinger/AudioResamplerSinc.h +++ b/services/audioflinger/AudioResamplerSinc.h @@ -44,13 +44,15 @@ public: private: void init(); + virtual void setVolume(int16_t left, int16_t right); + template void resample(int32_t* out, size_t outFrameCount, AudioBufferProvider* provider); template inline void filterCoefficient( - int32_t& l, int32_t& r, uint32_t phase, const int16_t *samples, uint32_t vRL); + int32_t* out, uint32_t phase, const int16_t *samples, uint32_t vRL); template inline void interpolate( @@ -65,6 +67,7 @@ private: int16_t *mState; int16_t *mImpulse; int16_t *mRingFull; + int32_t mVolumeSIMD[2]; const int32_t * mFirCoefs; static const int32_t mFirCoefsDown[]; -- cgit v1.1