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

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

Issue 2341783004: [chromecast] Slew stream volume changes in StreamMixerAlsa. (Closed)
Patch Set: Slew stream volume changes in StreamMixerAlsa. Created 4 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: chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc
diff --git a/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc b/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc
index 5f4b3e242dba708faca54239b5c517c4d7ebe71d..ee94e1b988fe8d0067fa98ceb0ec6305432d26c5 100644
--- a/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc
+++ b/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc
@@ -23,7 +23,6 @@
#include "chromecast/media/cma/backend/alsa/stream_mixer_alsa_input_impl.h"
#include "media/base/audio_bus.h"
#include "media/base/media_switches.h"
-#include "media/base/vector_math.h"
#define RETURN_REPORT_ERROR(snd_func, ...) \
do { \
@@ -830,10 +829,8 @@ bool StreamMixerAlsa::TryWriteFrames() {
for (InputQueue* input : active_inputs) {
input->GetResampledData(temp_.get(), chunk_size);
for (int c = 0; c < kNumOutputChannels; ++c) {
- float volume_scalar = input->volume_multiplier();
- DCHECK(volume_scalar >= 0.0 && volume_scalar <= 1.0) << volume_scalar;
- ::media::vector_math::FMAC(temp_->channel(c), volume_scalar, chunk_size,
- mixed_->channel(c));
+ input->VolumeScaleAccumulate(c, temp_->channel(c), chunk_size,
+ mixed_->channel(c));
}
}

Powered by Google App Engine
This is Rietveld 408576698