diff options
author | Glenn Kasten <gkasten@google.com> | 2015-03-24 19:42:30 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-03-24 19:42:31 +0000 |
commit | 82ceac025459b5b8887441d709081ec29c6b9416 (patch) | |
tree | 6400948366e9d51774601a03d149a4ba7b33e2cb /media/libmedia/AudioRecord.cpp | |
parent | 21b51b61ee52e6aa74d98b138d3dd4f0e17b1441 (diff) | |
parent | bfd318402924414fbde4d31c9d23cc423f10b630 (diff) | |
download | frameworks_av-82ceac025459b5b8887441d709081ec29c6b9416.zip frameworks_av-82ceac025459b5b8887441d709081ec29c6b9416.tar.gz frameworks_av-82ceac025459b5b8887441d709081ec29c6b9416.tar.bz2 |
Merge "set() in AudioRecord and AudioTracks needs no lock"
Diffstat (limited to 'media/libmedia/AudioRecord.cpp')
-rw-r--r-- | media/libmedia/AudioRecord.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/media/libmedia/AudioRecord.cpp b/media/libmedia/AudioRecord.cpp index 1a65ee8..7decafd 100644 --- a/media/libmedia/AudioRecord.cpp +++ b/media/libmedia/AudioRecord.cpp @@ -161,8 +161,6 @@ status_t AudioRecord::set( } mTransfer = transferType; - AutoMutex lock(mLock); - // invariant that mAudioRecord != 0 is true only after set() returns successfully if (mAudioRecord != 0) { ALOGE("Track already in use"); @@ -235,6 +233,7 @@ status_t AudioRecord::set( if (cbf != NULL) { mAudioRecordThread = new AudioRecordThread(*this, threadCanCallJava); mAudioRecordThread->run("AudioRecord", ANDROID_PRIORITY_AUDIO); + // thread begins in paused state, and will not reference us until start() } // create the IAudioRecord |