diff options
| author | 2010-01-27 14:21:20 -0800 | |
|---|---|---|
| committer | 2010-01-27 14:21:20 -0800 | |
| commit | 0ebff76e95aab7f6827ce1a8c25f1b4ad87a9029 (patch) | |
| tree | 877df1054ffe46b509da0d7ac1ade93e854e8714 /media/libmedia/AudioSystem.cpp | |
| parent | e6dca5c29b569ec245c665341bd8794abf6a02e9 (diff) | |
| parent | 0986e7907ffc8387b04fb201e285784bcd11b9b7 (diff) | |
Merge "Fix issue 2285561: New AudioFlinger and audio driver API needed for A/V sync"
Diffstat (limited to 'media/libmedia/AudioSystem.cpp')
| -rw-r--r-- | media/libmedia/AudioSystem.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp index e3b829be3d61..c5dfbb5356fe 100644 --- a/media/libmedia/AudioSystem.cpp +++ b/media/libmedia/AudioSystem.cpp @@ -342,6 +342,18 @@ status_t AudioSystem::setVoiceVolume(float value) return af->setVoiceVolume(value); } +status_t AudioSystem::getRenderPosition(uint32_t *halFrames, uint32_t *dspFrames, int stream) +{ + const sp<IAudioFlinger>& af = AudioSystem::get_audio_flinger(); + if (af == 0) return PERMISSION_DENIED; + + if (stream == DEFAULT) { + stream = MUSIC; + } + + return af->getRenderPosition(halFrames, dspFrames, getOutput((stream_type)stream)); +} + // --------------------------------------------------------------------------- void AudioSystem::AudioFlingerClient::binderDied(const wp<IBinder>& who) { |