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

Unified Diff: chromecast/public/avsettings.h

Issue 1602323003: [Chromecast] Add volume step interval getter to AvSettings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update API comment Created 4 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/public/avsettings.h
diff --git a/chromecast/public/avsettings.h b/chromecast/public/avsettings.h
index d0e71b732c9cb66596571a5e517fb0bd5505edb9..ae4cd8f3a0ee9489928d1f5580c3bc02265e51fc 100644
--- a/chromecast/public/avsettings.h
+++ b/chromecast/public/avsettings.h
@@ -107,6 +107,11 @@ class AvSettings {
// platform.
WAKE_ON_CAST_CHANGED = 6,
+ // This event shall be fired whenever the volume step interval provided
+ // by the device is changed, for e.g. when connecting to an AVR setup
+ // where step interval should be 1%.
+ AUDIO_VOLUME_STEP_INTERVAL_CHANGED = 7,
+
// This event should be fired when the device is connected to HDMI sinks.
HDMI_CONNECTED = 100,
@@ -177,6 +182,18 @@ class AvSettings {
// Nexus Player which is fixed volume.
virtual AudioVolumeControlType GetAudioVolumeControlType() = 0;
+ // Retrieves the volume step interval in range [0.0, 1.0] that specifies how
+ // much volume to change per step, e.g. 0.05 = 5%. Returns true if a valid
+ // interval is specified by platform; returns false if interval should defer
+ // to default values.
+ //
+ // Current default volume step intervals per control type are as follows:
+ // - MASTER_VOLUME: 0.05 (5%)
+ // - ATTENUATION_VOLUME: 0.02 (2%)
+ // - FIXED_VOLUME: 0.01 (1%)
+ // - UNKNOWN_VOLUME: 0.01 (1%)
+ virtual bool GetAudioVolumeStepInterval(float* step_inteval) = 0;
+
// Returns the current volume level, which must be from 0.0 (inclusive) to
// 1.0 (inclusive).
virtual float GetAudioVolume() = 0;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698