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

Unified Diff: chromecast/media/cma/backend/alsa/slew_volume.h

Issue 2860673003: [Chromecast] Correct libcast_governor behavior. (Closed)
Patch Set: address halliwell@'s comments Created 3 years, 7 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/slew_volume.h
diff --git a/chromecast/media/cma/backend/alsa/slew_volume.h b/chromecast/media/cma/backend/alsa/slew_volume.h
index 7e9f71ed6ce654742614a188a12b736bac4fc3c3..81152d2897efbbdf94a2b52e7d6836a9bd7d9772 100644
--- a/chromecast/media/cma/backend/alsa/slew_volume.h
+++ b/chromecast/media/cma/backend/alsa/slew_volume.h
@@ -37,10 +37,23 @@ class SlewVolume {
int frames,
float* dest);
+ // Processes a single channel of float data
+ // dest[i] = src[i] * volume_scaling.
+ // ProcessFMUL will be called once for each channel of audio present.
+ // |repeat_transition| should be true for channels 2 through n.
// Assumes 2 channels.
- bool ProcessInterleaved(int32_t* data, int frames);
+ void ProcessFMUL(bool repeat_transition,
+ const float* src,
+ int frames,
+ float* dest);
private:
+ template <typename Traits>
+ void ProcessData(bool repeat_transition,
+ const float* src,
+ int frames,
+ float* dest);
+
double sample_rate_;
double volume_scale_ = 1.0;
double current_volume_ = 1.0;

Powered by Google App Engine
This is Rietveld 408576698