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

Unified Diff: media/renderers/audio_renderer_impl.cc

Issue 1942803002: Caching AudioOutputDevice instances in mixer manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make WebAudioSourceProvider to always return real sink info reguardless the client - to avoid behavior change. Created 4 years, 7 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 | « media/renderers/audio_renderer_impl.h ('k') | media/renderers/audio_renderer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/renderers/audio_renderer_impl.cc
diff --git a/media/renderers/audio_renderer_impl.cc b/media/renderers/audio_renderer_impl.cc
index 5853864bf278f19e39e9f5242d7bea761316da52..c7e63e07d7d58d301bebf04faf5edb173bce3005 100644
--- a/media/renderers/audio_renderer_impl.cc
+++ b/media/renderers/audio_renderer_impl.cc
@@ -36,14 +36,12 @@ AudioRendererImpl::AudioRendererImpl(
const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
media::AudioRendererSink* sink,
ScopedVector<AudioDecoder> decoders,
- const AudioHardwareConfig& hardware_config,
const scoped_refptr<MediaLog>& media_log)
: task_runner_(task_runner),
expecting_config_changes_(false),
sink_(sink),
audio_buffer_stream_(
new AudioBufferStream(task_runner, std::move(decoders), media_log)),
- hardware_config_(hardware_config),
media_log_(media_log),
client_(nullptr),
tick_clock_(new base::DefaultTickClock()),
@@ -333,7 +331,8 @@ void AudioRendererImpl::Initialize(DemuxerStream* stream,
// failed.
init_cb_ = BindToCurrentLoop(init_cb);
- const AudioParameters& hw_params = hardware_config_.GetOutputConfig();
+ const AudioParameters& hw_params =
+ sink_->GetOutputDeviceInfo().output_params();
expecting_config_changes_ = stream->SupportsConfigChanges();
if (!expecting_config_changes_ || !hw_params.IsValid() ||
hw_params.format() == AudioParameters::AUDIO_FAKE) {
« no previous file with comments | « media/renderers/audio_renderer_impl.h ('k') | media/renderers/audio_renderer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698