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

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

Issue 1632393002: [Chromecast] Resample all audio below 32000 Hz. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 4 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 | chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9c3aa4f6271a3d7e13b277a99b8bf2b4ef0c5a0e..ef2ba7c3e5e112944fc5b967ad3ba23c354c773f 100644
--- a/chromecast/media/cma/backend/alsa/audio_decoder_alsa.cc
+++ b/chromecast/media/cma/backend/alsa/audio_decoder_alsa.cc
@@ -34,7 +34,6 @@ namespace {
const CastAudioDecoder::OutputFormat kDecoderSampleFormat =
CastAudioDecoder::kOutputPlanarFloat;
-const int kInvalidSampleRate = -1;
const int64_t kInvalidDelayTimestamp = std::numeric_limits<int64_t>::min();
AudioDecoderAlsa::RenderingDelay kInvalidRenderingDelay() {
@@ -93,7 +92,7 @@ bool AudioDecoderAlsa::Initialize() {
bool AudioDecoderAlsa::Start(int64_t start_pts) {
TRACE_FUNCTION_ENTRY0();
current_pts_ = start_pts;
- DCHECK_NE(config_.samples_per_second, kInvalidSampleRate);
+ DCHECK(IsValidConfig(config_));
mixer_input_.reset(new StreamMixerAlsaInput(
this, config_.samples_per_second, backend_->Primary()));
mixer_input_->SetVolumeMultiplier(volume_multiplier_);
« no previous file with comments | « no previous file | chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698