Chromium Code Reviews
Descriptionchrome.audio API: treat mute as system wide property
As part of audio API cleanup, simplify handling of mute flag.
Current implementation has few problems:
* Setting/getting mute state is done per device, even though mute is
system property (on the other hand mute state listeners are not
bound to a specific device).
* Muting input or output is not intuitive - one would have to
find an active device and set it's mute property - this would also
set mute for all remaining active devices.
This CL fixes these problems by decoupling mute state setter/getter
from particular device properties, and bounding states to stream type.
Additionally, StreamType enum is introduced - the type specifies type
of stream an audio device supports (input or output) and is intended
to replace existing isInput booleans used across the API.
Existing methods for managing mute state are kept around, but will not
be exposed to stable channel once the API is opened up (modulo
current API whitelist).
BUG=680358
Review-Url: https://codereview.chromium.org/2578473002
Cr-Commit-Position: refs/heads/master@{#446592}
Committed: https://chromium.googlesource.com/chromium/src/+/7cb7db5ae23a21d9267ce2e707a7eb6a1389e66e
Patch Set 1 #Patch Set 2 : . #Patch Set 3 : . #Patch Set 4 : . #Patch Set 5 : . #Patch Set 6 : . #
Total comments: 2
Patch Set 7 : with old mute event removed #Patch Set 8 : . #Patch Set 9 : . #
Total comments: 12
Patch Set 10 : . #Patch Set 11 : rebase #Patch Set 12 : . #Patch Set 13 : . #
Total comments: 12
Patch Set 14 : . #
Total comments: 8
Patch Set 15 : . #Patch Set 16 : . #Messages
Total messages: 53 (34 generated)
|