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

Unified Diff: chromecast/media/cma/backend/alsa/stream_mixer_alsa.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.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..1f5a2f21951879a86d8c5ded8336b3a56e06ba15 100644
--- a/chromecast/media/cma/backend/alsa/stream_mixer_alsa.h
+++ b/chromecast/media/cma/backend/alsa/stream_mixer_alsa.h
@@ -93,6 +93,12 @@ 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|.
+ virtual bool VolumeScaleAccumulate(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(

Powered by Google App Engine
This is Rietveld 408576698