Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(463)

Unified Diff: content/renderer/media/webrtc_audio_renderer.cc

Issue 11773017: Avoids crash in WebRTC audio clients for 96kHz render rate on Mac OSX. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/webrtc_audio_renderer.cc
diff --git a/content/renderer/media/webrtc_audio_renderer.cc b/content/renderer/media/webrtc_audio_renderer.cc
index dd85dd67ee410e2997fa354371ae2c4078c31ee2..750370549b0981cd6ea9a866234cfe3f5e19fc38 100644
--- a/content/renderer/media/webrtc_audio_renderer.cc
+++ b/content/renderer/media/webrtc_audio_renderer.cc
@@ -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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698