summaryrefslogtreecommitdiffstats
path: root/WebKit/android
diff options
context:
space:
mode:
authorDima Zavin <dima@android.com>2011-04-27 17:12:58 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-04-27 17:12:58 -0700
commitd628e7ba947e4b46f80e7b8fcdf904d29b9a225f (patch)
treeb4c8549c62ed935557fd803856b811440fd8660a /WebKit/android
parent019244a711e79fa2713a302f6a5583d6111b570e (diff)
parentae523aafcb7b5f04cd5ad61ab37e546ca7ca6df2 (diff)
downloadexternal_webkit-d628e7ba947e4b46f80e7b8fcdf904d29b9a225f.zip
external_webkit-d628e7ba947e4b46f80e7b8fcdf904d29b9a225f.tar.gz
external_webkit-d628e7ba947e4b46f80e7b8fcdf904d29b9a225f.tar.bz2
Merge "webkit: convert to use new audio.h"
Diffstat (limited to 'WebKit/android')
-rw-r--r--WebKit/android/plugins/ANPSoundInterface.cpp16
1 files changed, 9 insertions, 7 deletions
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 <hardware/audio.h>
+
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,