summaryrefslogtreecommitdiffstats
path: root/media/libmedia/AudioSystem.cpp
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2014-01-13 09:59:31 -0800
committerGlenn Kasten <gkasten@google.com>2014-01-14 18:12:46 -0800
commit5f972c031d4061f4f037c9fda1ea4bd9b6a756cd (patch)
treef70d82aa480a0cbe854395362aba76fbb58315dc /media/libmedia/AudioSystem.cpp
parent5b27ccd67c845aa20a12a1fb58339e7e81e3d536 (diff)
downloadframeworks_av-5f972c031d4061f4f037c9fda1ea4bd9b6a756cd.zip
frameworks_av-5f972c031d4061f4f037c9fda1ea4bd9b6a756cd.tar.gz
frameworks_av-5f972c031d4061f4f037c9fda1ea4bd9b6a756cd.tar.bz2
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
Diffstat (limited to 'media/libmedia/AudioSystem.cpp')
-rw-r--r--media/libmedia/AudioSystem.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp
index 4580030..2188cac 100644
--- a/media/libmedia/AudioSystem.cpp
+++ b/media/libmedia/AudioSystem.cpp
@@ -413,9 +413,9 @@ status_t AudioSystem::getRenderPosition(audio_io_handle_t output, size_t *halFra
return af->getRenderPosition(halFrames, dspFrames, output);
}
-size_t AudioSystem::getInputFramesLost(audio_io_handle_t ioHandle) {
+uint32_t AudioSystem::getInputFramesLost(audio_io_handle_t ioHandle) {
const sp<IAudioFlinger>& af = AudioSystem::get_audio_flinger();
- unsigned int result = 0;
+ uint32_t result = 0;
if (af == 0) return result;
if (ioHandle == 0) return result;