From bf04a5d7f287fc712e0ed91849dc85c90c1e182d Mon Sep 17 00:00:00 2001 From: Glenn Kasten Date: Thu, 12 Jul 2012 09:07:11 -0700 Subject: Simplify AudioRecord::getInputFramesLost() This also fixes a benign race in reading mActive without a lock. Change-Id: I19e953d4f275e5c266ca1ca3fece7b6c02ad1707 --- services/audioflinger/AudioFlinger.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'services/audioflinger/AudioFlinger.cpp') diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index 765127a..2ed3324 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -978,10 +978,6 @@ size_t AudioFlinger::getInputBufferSize(uint32_t sampleRate, audio_format_t form unsigned int AudioFlinger::getInputFramesLost(audio_io_handle_t ioHandle) const { - if (ioHandle == 0) { - return 0; - } - Mutex::Autolock _l(mLock); RecordThread *recordThread = checkRecordThread_l(ioHandle); -- cgit v1.1