From 5f972c031d4061f4f037c9fda1ea4bd9b6a756cd Mon Sep 17 00:00:00 2001 From: Glenn Kasten Date: Mon, 13 Jan 2014 09:59:31 -0800 Subject: AudioRecord::getInputFramesLost() cleanup Fixed bug that if the binder call failed (for example if the IAudioFlinger binder is dead), then getInputFramesLost was returning garbage. Now it correctly returns zero, which is the error value for this method. The type declarations for getInputFramesLost were inconsistent: a mixture of unsigned int, size_t, and uint32_t. Now it returns uint32_t everywhere, which is what the underlying HAL API returns. Added a FIXME about the side effect behavior. This will need review for multi-client. Change-Id: Ifa2e117a87dbd0c1f2c892a31d1c3dd919bf1a0a --- media/libstagefright/AudioSource.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'media/libstagefright/AudioSource.cpp') diff --git a/media/libstagefright/AudioSource.cpp b/media/libstagefright/AudioSource.cpp index d7223d9..cadadc8 100644 --- a/media/libstagefright/AudioSource.cpp +++ b/media/libstagefright/AudioSource.cpp @@ -278,7 +278,7 @@ status_t AudioSource::dataCallback(const AudioRecord::Buffer& audioBuffer) { // Drop retrieved and previously lost audio data. if (mNumFramesReceived == 0 && timeUs < mStartTimeUs) { - mRecord->getInputFramesLost(); + (void) mRecord->getInputFramesLost(); ALOGV("Drop audio data at %lld/%lld us", timeUs, mStartTimeUs); return OK; } -- cgit v1.1