From ae523aafcb7b5f04cd5ad61ab37e546ca7ca6df2 Mon Sep 17 00:00:00 2001 From: Dima Zavin Date: Tue, 5 Apr 2011 16:03:58 -0700 Subject: webkit: convert to use new audio.h Change-Id: I2754c4fdf8a367530e2be5c215e5a3823e4957c5 Signed-off-by: Dima Zavin --- WebKit/android/plugins/ANPSoundInterface.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'WebKit/android') diff --git a/WebKit/android/plugins/ANPSoundInterface.cpp b/WebKit/android/plugins/ANPSoundInterface.cpp index 91778e3..c109880 100644 --- a/WebKit/android/plugins/ANPSoundInterface.cpp +++ b/WebKit/android/plugins/ANPSoundInterface.cpp @@ -30,6 +30,8 @@ #include "SkTypes.h" #include "media/AudioTrack.h" +#include + struct ANPAudioTrack { void* mUser; ANPAudioCallbackProc mProc; @@ -38,9 +40,9 @@ struct ANPAudioTrack { static ANPSampleFormat toANPFormat(int fm) { switch (fm) { - case android::AudioSystem::PCM_16_BIT: + case AUDIO_FORMAT_PCM_16_BIT: return kPCM16Bit_ANPSampleFormat; - case android::AudioSystem::PCM_8_BIT: + case AUDIO_FORMAT_PCM_8_BIT: return kPCM8Bit_ANPSampleFormat; default: return kUnknown_ANPSamleFormat; @@ -50,11 +52,11 @@ static ANPSampleFormat toANPFormat(int fm) { static int fromANPFormat(ANPSampleFormat fm) { switch (fm) { case kPCM16Bit_ANPSampleFormat: - return android::AudioSystem::PCM_16_BIT; + return AUDIO_FORMAT_PCM_16_BIT; case kPCM8Bit_ANPSampleFormat: - return android::AudioSystem::PCM_8_BIT; + return AUDIO_FORMAT_PCM_8_BIT; default: - return android::AudioSystem::INVALID_FORMAT; + return AUDIO_FORMAT_INVALID; } } @@ -95,10 +97,10 @@ static ANPAudioTrack* ANPCreateTrack(uint32_t sampleRate, track->mUser = user; track->mProc = proc; - track->mTrack = new android::AudioTrack(android::AudioSystem::MUSIC, + track->mTrack = new android::AudioTrack(AUDIO_STREAM_MUSIC, sampleRate, fromANPFormat(format), - (channelCount > 1) ? android::AudioSystem::CHANNEL_OUT_STEREO : android::AudioSystem::CHANNEL_OUT_MONO, + (channelCount > 1) ? AUDIO_CHANNEL_OUT_STEREO : AUDIO_CHANNEL_OUT_MONO, 0, // frameCount 0, // flags callbackProc, -- cgit v1.1