diff options
author | Eric Laurent <elaurent@google.com> | 2011-08-08 09:31:42 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-08-08 09:31:42 -0700 |
commit | c993acbce63b60385b01cf1b95a4799ec308339b (patch) | |
tree | 91c5994bc4faa34a22d7cfb495e78de248f2fc63 /services/audioflinger/AudioFlinger.h | |
parent | 6f9ff5368c79f8d8d74ee5fa0cdc5410c57cf671 (diff) | |
parent | 828b9773cc765f45b4f61af70f2184ca85fa82f9 (diff) | |
download | frameworks_base-c993acbce63b60385b01cf1b95a4799ec308339b.zip frameworks_base-c993acbce63b60385b01cf1b95a4799ec308339b.tar.gz frameworks_base-c993acbce63b60385b01cf1b95a4799ec308339b.tar.bz2 |
Merge "AudioFlinger: protect input/output stream access"
Diffstat (limited to 'services/audioflinger/AudioFlinger.h')
-rw-r--r-- | services/audioflinger/AudioFlinger.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h index 791341a..4fa70a2 100644 --- a/services/audioflinger/AudioFlinger.h +++ b/services/audioflinger/AudioFlinger.h @@ -724,8 +724,9 @@ private: int sessionId, status_t *status); - AudioStreamOut* getOutput() { return mOutput; } - virtual audio_stream_t* stream() { return &mOutput->stream->common; } + AudioStreamOut* getOutput(); + AudioStreamOut* clearOutput(); + virtual audio_stream_t* stream(); void suspend() { mSuspended++; } void restore() { if (mSuspended) mSuspended--; } @@ -967,7 +968,7 @@ private: ~RecordThread(); virtual bool threadLoop(); - virtual status_t readyToRun() { return NO_ERROR; } + virtual status_t readyToRun(); virtual void onFirstRef(); virtual status_t initCheck() const { return (mInput == 0) ? NO_INIT : NO_ERROR; } @@ -984,8 +985,9 @@ private: status_t start(RecordTrack* recordTrack); void stop(RecordTrack* recordTrack); status_t dump(int fd, const Vector<String16>& args); - AudioStreamIn* getInput() { return mInput; } - virtual audio_stream_t* stream() { return &mInput->stream->common; } + AudioStreamIn* getInput(); + AudioStreamIn* clearInput(); + virtual audio_stream_t* stream(); virtual status_t getNextBuffer(AudioBufferProvider::Buffer* buffer); virtual void releaseBuffer(AudioBufferProvider::Buffer* buffer); |