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

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

Issue 596073002: Allow better AudioRendererMixer reuse by ignoring irrelevant params. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Typo. Created 6 years, 3 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
Index: content/renderer/media/audio_renderer_mixer_manager.cc
diff --git a/content/renderer/media/audio_renderer_mixer_manager.cc b/content/renderer/media/audio_renderer_mixer_manager.cc
index 901807bad19e865da43a8d860cbb43a56ac0c015..4a62d1a15838ede9071ee57f590a28404b69e968 100644
--- a/content/renderer/media/audio_renderer_mixer_manager.cc
+++ b/content/renderer/media/audio_renderer_mixer_manager.cc
@@ -47,6 +47,9 @@ media::AudioRendererMixer* AudioRendererMixerManager::GetMixer(
int source_render_view_id,
int source_render_frame_id,
const media::AudioParameters& params) {
+ // Effects are not passed through to output creation, so ensure none are set.
+ DCHECK_EQ(params.effects(), media::AudioParameters::NO_EFFECTS);
+
const MixerKey key(source_render_view_id, params);
base::AutoLock auto_lock(mixers_lock_);
@@ -66,7 +69,7 @@ media::AudioRendererMixer* AudioRendererMixerManager::GetMixer(
// Create output parameters based on the audio hardware configuration for
// passing on to the output sink. Force to 16-bit output for now since we
- // know that works well for WebAudio and WebRTC.
+ // know that works everywhere; ChromeOS does not support other bit depths.
media::AudioParameters output_params(
media::AudioParameters::AUDIO_PCM_LOW_LATENCY, params.channel_layout(),
sample_rate, 16, hardware_config_->GetHighLatencyBufferSize());
« no previous file with comments | « content/renderer/media/audio_renderer_mixer_manager.h ('k') | content/renderer/media/audio_renderer_mixer_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698