summaryrefslogtreecommitdiffstats
path: root/WebKit
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2009-07-17 11:26:37 -0700
committerEric Laurent <elaurent@google.com>2009-07-22 08:33:44 -0700
commitbeeaff31cb168d09ed9157d08b1ef161d738a285 (patch)
tree51e6897662a94f2260d440f6a7b8a52ce24deaf0 /WebKit
parentf86737b0ce8c81f2b529503f83eb8b064769eeca (diff)
downloadexternal_webkit-beeaff31cb168d09ed9157d08b1ef161d738a285.zip
external_webkit-beeaff31cb168d09ed9157d08b1ef161d738a285.tar.gz
external_webkit-beeaff31cb168d09ed9157d08b1ef161d738a285.tar.bz2
Fix issue 1795088 Improve audio routing code
Integrated comments after patch set 1 review.
Diffstat (limited to 'WebKit')
-rw-r--r--WebKit/android/plugins/ANPSoundInterface.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/WebKit/android/plugins/ANPSoundInterface.cpp b/WebKit/android/plugins/ANPSoundInterface.cpp
index 6b019d1..c4bec1c 100644
--- a/WebKit/android/plugins/ANPSoundInterface.cpp
+++ b/WebKit/android/plugins/ANPSoundInterface.cpp
@@ -46,7 +46,7 @@ static ANPSampleFormat toANPFormat(int fm) {
}
}
-static android::AudioSystem::audio_format fromANPFormat(ANPSampleFormat fm) {
+static int fromANPFormat(ANPSampleFormat fm) {
switch (fm) {
case kPCM16Bit_ANPSampleFormat:
return android::AudioSystem::PCM_16_BIT;
@@ -97,7 +97,7 @@ static ANPAudioTrack* ANPCreateTrack(uint32_t sampleRate,
track->mTrack = new android::AudioTrack(android::AudioSystem::MUSIC,
sampleRate,
fromANPFormat(format),
- channelCount,
+ (channelCount > 1) ? android::AudioSystem::CHANNEL_OUT_STEREO : android::AudioSystem::CHANNEL_OUT_MONO,
0, // frameCount
0, // flags
callbackProc,