Commit f96f1f27 authored by henrika@chromium.org's avatar henrika@chromium.org

Avoids crash in WebRTC audio clients for 96kHz render rate on Mac OSX.

TBR=xians
BUG=166523
TEST=Misc set of WebRTC audio clients on Mac.

Review URL: https://codereview.chromium.org/11773017

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175323 0039d316-1c4b-4281-b951-d872f2087c98
parent f3a7927c
......@@ -160,11 +160,11 @@ bool WebRtcAudioRenderer::Initialize(WebRtcAudioRendererSource* source) {
// Render side: AUDIO_PCM_LOW_LATENCY on Mac OS X is based on a callback-
// driven Core Audio implementation. Tests have shown that 10ms is a suitable
// frame size to use, both for 48kHz and 44.1kHz.
// frame size to use for 96kHz, 48kHz and 44.1kHz.
// Use different buffer sizes depending on the current hardware sample rate.
if (sample_rate == 48000) {
buffer_size = 480;
if (sample_rate == 96000 || sample_rate == 48000) {
buffer_size = (sample_rate / 100);
} else {
// We do run at 44.1kHz at the actual audio layer, but ask for frames
// at 44.0kHz to ensure that we can feed them to the webrtc::VoiceEngine.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment