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

Unified Diff: chromecast/media/cma/backend/alsa/audio_decoder_alsa.cc

Issue 2738873002: [Chromecast] Implement new volume control API (Closed)
Patch Set: no need for ALSA volume control Created 3 years, 9 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: chromecast/media/cma/backend/alsa/audio_decoder_alsa.cc
diff --git a/chromecast/media/cma/backend/alsa/audio_decoder_alsa.cc b/chromecast/media/cma/backend/alsa/audio_decoder_alsa.cc
index 0221c0a9263c7bd9abbf3c5d5bb15c577bb90f9f..76888353f6dc1d20e90fd878f164a45ee510bd2a 100644
--- a/chromecast/media/cma/backend/alsa/audio_decoder_alsa.cc
+++ b/chromecast/media/cma/backend/alsa/audio_decoder_alsa.cc
@@ -108,9 +108,9 @@ bool AudioDecoderAlsa::Start(int64_t start_pts) {
TRACE_FUNCTION_ENTRY0();
current_pts_ = start_pts;
DCHECK(IsValidConfig(config_));
- mixer_input_.reset(new StreamMixerAlsaInput(this, config_.samples_per_second,
- backend_->Primary(),
- backend_->DeviceId()));
+ mixer_input_.reset(new StreamMixerAlsaInput(
+ this, config_.samples_per_second, backend_->Primary(),
+ backend_->DeviceId(), backend_->ContentType()));
mixer_input_->SetVolumeMultiplier(volume_multiplier_);
// Create decoder_ if necessary. This can happen if Stop() was called, and
// SetConfig() was not called since then.
@@ -238,9 +238,9 @@ bool AudioDecoderAlsa::SetConfig(const AudioConfig& config) {
// Destroy the old input first to ensure that the mixer output sample rate
// is updated.
mixer_input_.reset();
- mixer_input_.reset(new StreamMixerAlsaInput(this, config.samples_per_second,
- backend_->Primary(),
- backend_->DeviceId()));
+ mixer_input_.reset(new StreamMixerAlsaInput(
+ this, config.samples_per_second, backend_->Primary(),
+ backend_->DeviceId(), backend_->ContentType()));
mixer_input_->SetVolumeMultiplier(volume_multiplier_);
pending_output_frames_ = kNoPendingOutput;
}

Powered by Google App Engine
This is Rietveld 408576698