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

Unified Diff: extensions/common/api/audio.idl

Issue 945103002: Add a new audio extension event OnLevelChanged. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update audio.idl comment Created 5 years, 9 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: extensions/common/api/audio.idl
diff --git a/extensions/common/api/audio.idl b/extensions/common/api/audio.idl
index 0f088276c5da0c3eac0f310a4b46c9fb94d8f364..9461cbd3cf04377d9a04ada630b88dbbdaaaa250 100644
--- a/extensions/common/api/audio.idl
+++ b/extensions/common/api/audio.idl
@@ -16,7 +16,7 @@ namespace audio {
boolean isActive;
// True if this is muted.
boolean isMuted;
- // The output volume ranging from 0.0 to 1.0.
+ // The output volume ranging from 0.0 to 100.0.
double volume;
};
@@ -29,7 +29,7 @@ namespace audio {
boolean isActive;
// True if this is muted.
boolean isMuted;
- // The input gain ranging from 0.0 to 1.0.
+ // The input gain ranging from 0.0 to 100.0.
asargent_no_longer_on_chrome 2015/03/17 16:21:15 As discussed in chat, if this is a supported API o
jennyz 2015/03/17 18:17:28 This was documented incorrectly before, now it is
double gain;
};
@@ -50,10 +50,17 @@ namespace audio {
callback SetPropertiesCallback = void();
interface Functions {
- // Get the information of all audio output and input devices.
+ // Gets the information of all audio output and input devices.
static void getInfo(GetInfoCallback callback);
- // Select a subset of audio devices as active.
+ // Sets the active nodes to the nodes specified by |ids|.
+ // It can pass in the "complete" active node id list of either input
+ // nodes, or output nodes, or both. If only input node ids are passed in,
+ // it will only change the input nodes' active status, output nodes will NOT
+ // be changed; similarly for the case if only output nodes are passed.
+ // If the nodes specified in |new_active_ids| are already active, they will
+ // remain active. Otherwise, the old active nodes will be de-activated before
+ // we activate the new nodes with the same type(input/output).
static void setActiveDevices(DOMString[] ids,
SetActiveDevicesCallback callback);
@@ -61,10 +68,15 @@ namespace audio {
static void setProperties(DOMString id,
DeviceProperties properties,
SetPropertiesCallback callback);
- };
+ };
interface Events {
// Fired when anything changes to the audio device configuration.
static void onDeviceChanged();
+
+ // Fired when sound level changes for an active audio node.
+ // |id|: id of the audio node.
+ // |level|: new sound level of the node(volume for output, gain for input).
asargent_no_longer_on_chrome 2015/03/17 16:21:15 it might be worth mentioning the scale of the |lev
jennyz 2015/03/17 18:17:28 We are in the process to transit the old audio ext
+ static void OnLevelChanged(DOMString id, long level);
};
};

Powered by Google App Engine
This is Rietveld 408576698