diff options
author | Glenn Kasten <gkasten@google.com> | 2012-11-08 12:13:58 -0800 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2012-11-08 12:18:59 -0800 |
commit | b929e417853694e37aba1ef4399f188987b709d9 (patch) | |
tree | 670f2da01fd3d33df6da2998c78273e0701300ad /services | |
parent | a47f3165f53c8e8fb8907a94de7417e2c3047eeb (diff) | |
download | frameworks_av-b929e417853694e37aba1ef4399f188987b709d9.zip frameworks_av-b929e417853694e37aba1ef4399f188987b709d9.tar.gz frameworks_av-b929e417853694e37aba1ef4399f188987b709d9.tar.bz2 |
Move buffers pointer out of the control block
This is part of a series to clean up the control block.
Change-Id: Ie474557db7cb360f2d9a0f11600a68f5a3d46f07
Diffstat (limited to 'services')
-rw-r--r-- | services/audioflinger/AudioFlinger.cpp | 6 | ||||
-rw-r--r-- | services/audioflinger/AudioFlinger.h | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index 69ac3e3..c0f5c7b 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -5534,11 +5534,11 @@ AudioFlinger::PlaybackThread::OutputTrack::OutputTrack( int frameCount) : Track(playbackThread, NULL, AUDIO_STREAM_CNT, sampleRate, format, channelMask, frameCount, NULL, 0, IAudioFlinger::TRACK_DEFAULT), - mActive(false), mSourceThread(sourceThread) + mActive(false), mSourceThread(sourceThread), mBuffers(NULL) { if (mCblk != NULL) { - mCblk->buffers = (char*)mCblk + sizeof(audio_track_cblk_t); + mBuffers = (char*)mCblk + sizeof(audio_track_cblk_t); mOutBuffer.frameCount = 0; playbackThread->mTracks.add(this); ALOGV("OutputTrack constructor mCblk %p, mBuffer %p, mCblk->buffers %p, " \ @@ -5749,7 +5749,7 @@ status_t AudioFlinger::PlaybackThread::OutputTrack::obtainBuffer( } buffer->frameCount = framesReq; - buffer->raw = (void *)cblk->buffer(u); + buffer->raw = cblk->buffer(mBuffers, u); return NO_ERROR; } diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h index 1417105..fc24bed 100644 --- a/services/audioflinger/AudioFlinger.h +++ b/services/audioflinger/AudioFlinger.h @@ -1035,6 +1035,7 @@ private: AudioBufferProvider::Buffer mOutBuffer; bool mActive; DuplicatingThread* const mSourceThread; // for waitTimeMs() in write() + void* mBuffers; // starting address of buffers in plain memory }; // end of OutputTrack PlaybackThread(const sp<AudioFlinger>& audioFlinger, AudioStreamOut* output, |