From 0986e7907ffc8387b04fb201e285784bcd11b9b7 Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Tue, 19 Jan 2010 17:37:09 -0800 Subject: Fix issue 2285561: New AudioFlinger and audio driver API needed for A/V sync Added getRenderPosition() API to IAudioFlinger to retreive number of audio frames written by AudioFlinger to audio HAL and by DSP to DAC. Added getRenderPosition() API to AudioHardwareInterface to retreive number of audio frames written by DSP to DAC. Exposed AudioTrack::getPosition() to AudioSink() to make it available to media player. Removed excessive log in AudioHardwareGeneric. --- libs/audioflinger/AudioDumpInterface.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libs/audioflinger/AudioDumpInterface.cpp') diff --git a/libs/audioflinger/AudioDumpInterface.cpp b/libs/audioflinger/AudioDumpInterface.cpp index 858e5aab057a..30e2bc9c9b3d 100644 --- a/libs/audioflinger/AudioDumpInterface.cpp +++ b/libs/audioflinger/AudioDumpInterface.cpp @@ -379,6 +379,12 @@ void AudioStreamOutDump::Close() } } +status_t AudioStreamOutDump::getRenderPosition(uint32_t *dspFrames) +{ + if (mFinalStream != 0 ) return mFinalStream->getRenderPosition(dspFrames); + return INVALID_OPERATION; +} + // ---------------------------------------------------------------------------- AudioStreamInDump::AudioStreamInDump(AudioDumpInterface *interface, -- cgit v1.2.3-59-g8ed1b