summaryrefslogtreecommitdiffstats
path: root/content/renderer/media
diff options
context:
space:
mode:
authorxians@chromium.org <xians@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-27 03:56:16 +0000
committerxians@chromium.org <xians@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-27 03:56:16 +0000
commit73a95af00febdfc21555d5564c56b356115f2ce0 (patch)
tree358bdbf57159ef3b41445046303f78e48bf77bc5 /content/renderer/media
parent1c84a7c2daa24cae2017482daed03f5bcf2d5633 (diff)
downloadchromium_src-73a95af00febdfc21555d5564c56b356115f2ce0.zip
chromium_src-73a95af00febdfc21555d5564c56b356115f2ce0.tar.gz
chromium_src-73a95af00febdfc21555d5564c56b356115f2ce0.tar.bz2
A quick fix to the unsupported sample format of 8bits per channel.
BUG=120168 TEST=http://www.corp.google.com/~tommi/chrome-audio//many_audio_elements.html (create just 1 channel) Review URL: http://codereview.chromium.org/9773029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129124 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/media')
-rw-r--r--content/renderer/media/audio_device.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/content/renderer/media/audio_device.cc b/content/renderer/media/audio_device.cc
index da9b57f..b1e5cdf 100644
--- a/content/renderer/media/audio_device.cc
+++ b/content/renderer/media/audio_device.cc
@@ -69,6 +69,13 @@ void AudioDevice::Initialize(const AudioParameters& params,
CHECK(!callback_); // Calling Initialize() twice?
audio_parameters_ = params;
+ // TODO(xians): We have to hard code the sample format to 16 since the
+ // current audio path does not support sample formats rather than 16bits per
+ // channel. Remove it if the problem is fixed.
+ audio_parameters_.Reset(
+ params.format(),
+ params.channel_layout(), params.sample_rate(), 16,
+ params.frames_per_buffer());
callback_ = callback;
}