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

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: address comments 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..61e6891f3347fb55fee0815179d9e26206052b01 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"
@@ -113,13 +114,15 @@ class StreamMixerAlsaInputImpl : public StreamMixerAlsa::InputQueue {
private:
// StreamMixerAlsa::InputQueue implementation:
int input_samples_per_second() const override;
- float volume_multiplier() const override;
bool primary() const override;
bool IsDeleting() const override;
void Initialize(const MediaPipelineBackendAlsa::RenderingDelay&
mixer_rendering_delay) override;
int MaxReadSize() override;
void GetResampledData(::media::AudioBus* dest, int frames) override;
+ void 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,7 +152,7 @@ class StreamMixerAlsaInputImpl : public StreamMixerAlsa::InputQueue {
double resample_ratio_;
State state_;
- float volume_multiplier_;
+ SlewVolume slew_volume_;
base::Lock queue_lock_; // Lock for the following queue-related members.
scoped_refptr<DecoderBufferBase> pending_data_;

Powered by Google App Engine
This is Rietveld 408576698