Index: chromecast/media/cma/backend/alsa/stream_mixer_alsa.h |
diff --git a/chromecast/media/cma/backend/alsa/stream_mixer_alsa.h b/chromecast/media/cma/backend/alsa/stream_mixer_alsa.h |
index e189d1db2749209a1511c4b2bea9bd56c351985e..0cfa3e625463abd98c5e985d530ea6f3ff6d9b0d 100644 |
--- a/chromecast/media/cma/backend/alsa/stream_mixer_alsa.h |
+++ b/chromecast/media/cma/backend/alsa/stream_mixer_alsa.h |
@@ -64,10 +64,6 @@ class StreamMixerAlsa { |
// positive. |
virtual int input_samples_per_second() const = 0; |
- // This number will be used to scale the stream before it is mixed. The |
- // result must be in the range (0.0, 1.0]. |
- virtual float volume_multiplier() const = 0; |
- |
// Returns true if the stream is primary. Primary streams will be given |
// precedence for sample rates and will dictate when data is polled. |
virtual bool primary() const = 0; |
@@ -93,6 +89,16 @@ class StreamMixerAlsa { |
// MaxReadSize(), and |dest->frames()| shall be >= |frames|. |
virtual void GetResampledData(::media::AudioBus* dest, int frames) = 0; |
+ // Scale |frames| frames at |src| by the current volume (smoothing as |
+ // needed). Add the scaled result to |dest|. |
+ // VolumeScaleAccumulate will be called once for each channel of audio |
+ // present and |repeat_transition| will be true for channels 2 through n. |
+ // |src| and |dest| should be 16-byte aligned. |
+ virtual void VolumeScaleAccumulate(bool repeat_transition, |
+ const float* src, |
+ int frames, |
+ float* dest) = 0; |
+ |
// This is called for every InputQueue when the mixer writes data to ALSA |
// for any of its input streams. |
virtual void AfterWriteFrames( |