summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/Threads.h
diff options
context:
space:
mode:
authorAndy Hung <hunga@google.com>2014-03-04 16:01:44 -0800
committerAndy Hung <hunga@google.com>2014-03-10 14:20:55 -0700
commite7e676fd2866fa4898712c4effa9e624e969c182 (patch)
treee34f072392608660e29684f42d43bad6a179ea37 /services/audioflinger/Threads.h
parent98ef978df4e928f486d244c4d7f7ad9f13111e98 (diff)
downloadframeworks_av-e7e676fd2866fa4898712c4effa9e624e969c182.zip
frameworks_av-e7e676fd2866fa4898712c4effa9e624e969c182.tar.gz
frameworks_av-e7e676fd2866fa4898712c4effa9e624e969c182.tar.bz2
Convert AudioFlinger mSinkBuffer to flexible format
Change-Id: I618d9c99a5f6f8c8d6a9f4b2d19e82c9ddc3b06e Signed-off-by: Andy Hung <hunga@google.com>
Diffstat (limited to 'services/audioflinger/Threads.h')
-rw-r--r--services/audioflinger/Threads.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/services/audioflinger/Threads.h b/services/audioflinger/Threads.h
index 3af4874..59d5c66 100644
--- a/services/audioflinger/Threads.h
+++ b/services/audioflinger/Threads.h
@@ -450,8 +450,11 @@ public:
virtual String8 getParameters(const String8& keys);
virtual void audioConfigChanged_l(int event, int param = 0);
status_t getRenderPosition(uint32_t *halFrames, uint32_t *dspFrames);
- // TODO: rename mixBuffer() to sinkBuffer() or try to remove external use.
- int16_t *mixBuffer() const { return mSinkBuffer; };
+ // FIXME rename mixBuffer() to sinkBuffer() and remove int16_t* dependency.
+ // Consider also removing and passing an explicit mMainBuffer initialization
+ // parameter to AF::PlaybackThread::Track::Track().
+ int16_t *mixBuffer() const {
+ return reinterpret_cast<int16_t *>(mSinkBuffer); };
virtual void detachAuxEffect_l(int effectId);
status_t attachAuxEffect(const sp<AudioFlinger::PlaybackThread::Track> track,
@@ -482,7 +485,7 @@ protected:
// updated by readOutputParameters_l()
size_t mNormalFrameCount; // normal mixer and effects
- int16_t* mSinkBuffer; // frame size aligned sink buffer
+ void* mSinkBuffer; // frame size aligned sink buffer
// TODO:
// Rearrange the buffer info into a struct/class with