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/stream_mixer_alsa_input_impl.h

Issue 2341783004: [chromecast] Slew stream volume changes in StreamMixerAlsa. (Closed)
Patch Set: 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_input_impl.h
diff --git a/chromecast/media/cma/backend/alsa/stream_mixer_alsa_input_impl.h b/chromecast/media/cma/backend/alsa/stream_mixer_alsa_input_impl.h
index fb529e19d586d11b9dec60df885921249ec01ab4..6e4fb3c49797451723a40eed70186fcfb00d2fd4 100644
--- a/chromecast/media/cma/backend/alsa/stream_mixer_alsa_input_impl.h
+++ b/chromecast/media/cma/backend/alsa/stream_mixer_alsa_input_impl.h
@@ -14,6 +14,7 @@
#include "base/memory/weak_ptr.h"
#include "base/synchronization/lock.h"
#include "chromecast/media/cma/backend/alsa/media_pipeline_backend_alsa.h"
+#include "chromecast/media/cma/backend/alsa/slew_volume.h"
#include "chromecast/media/cma/backend/alsa/stream_mixer_alsa.h"
#include "chromecast/media/cma/backend/alsa/stream_mixer_alsa_input.h"
@@ -120,6 +121,9 @@ class StreamMixerAlsaInputImpl : public StreamMixerAlsa::InputQueue {
mixer_rendering_delay) override;
int MaxReadSize() override;
void GetResampledData(::media::AudioBus* dest, int frames) override;
+ bool VolumeScaleAccumulate(const float* src,
+ int frames,
+ float* dest) override;
void AfterWriteFrames(const MediaPipelineBackendAlsa::RenderingDelay&
mixer_rendering_delay) override;
void SignalError(StreamMixerAlsaInput::MixerError error) override;
@@ -149,6 +153,7 @@ class StreamMixerAlsaInputImpl : public StreamMixerAlsa::InputQueue {
double resample_ratio_;
State state_;
+ SlewVolume slew_volume_;
float volume_multiplier_;
base::Lock queue_lock_; // Lock for the following queue-related members.

Powered by Google App Engine
This is Rietveld 408576698