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

Unified Diff: media/renderers/audio_renderer_impl.cc

Issue 2836293002: Introduce AudioRendererSink::IsOptimizedForHardwareParameters (Closed)
Patch Set: rebase Created 3 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') | no next file » | 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 bc06582e02e1d32d06947ea1273ba275c2920fb8..a351b9a84ec0a7ae9207f94af19cc412237dc0ee 100644
--- a/media/renderers/audio_renderer_impl.cc
+++ b/media/renderers/audio_renderer_impl.cc
@@ -370,7 +370,8 @@ void AudioRendererImpl::Initialize(DemuxerStream* stream,
const AudioParameters& hw_params = output_device_info.output_params();
expecting_config_changes_ = stream->SupportsConfigChanges();
if (!expecting_config_changes_ || !hw_params.IsValid() ||
- hw_params.format() == AudioParameters::AUDIO_FAKE) {
+ hw_params.format() == AudioParameters::AUDIO_FAKE ||
+ !sink_->IsOptimizedForHardwareParameters()) {
// The actual buffer size is controlled via the size of the AudioBus
// provided to Render(), but we should choose a value here based on hardware
// parameters if possible since it affects the initial buffer size used by
« no previous file with comments | « media/renderers/audio_renderer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698