WebAPI/AudioChannels: Difference between revisions

no edit summary
No edit summary
Line 99: Line 99:
# the settings app can have configurations ad-hoc for the audio management and apps
# the settings app can have configurations ad-hoc for the audio management and apps


== Settings ==
== Volume control ==


There's multiple different settings for audio volume:
There's multiple different settings for audio volume:
Line 109: Line 109:
* '''audio.volume.bt_sco''': Volume when bluetooth headset is plugged in. It's an integer between 0 and 15.
* '''audio.volume.bt_sco''': Volume when bluetooth headset is plugged in. It's an integer between 0 and 15.


Note that headphones do not use the same audio setting as bluetooth. Instead headphones use the same volume as when headphones are not plugged in.
Note that headphones do not use the same audio setting as bluetooth. Instead headphones use the same volume as when headphones are not plugged in. We should fix this such that headphones are controlled through a dedicated volume control.
 
'''Todo:''' Describe policies for which volume is controlled when volume buttons are pressed.
 
'''Todo:''' Describe "silent mode".


== Security model ==
== Security model ==
Line 145: Line 149:
Ability for apps to:
Ability for apps to:
* Act as if it's occupying a channel without actually using a media element playing on that channel. This is useful for example to prepare for audio which is about to start playing, or to prepare for turning on the camera.
* Act as if it's occupying a channel without actually using a media element playing on that channel. This is useful for example to prepare for audio which is about to start playing, or to prepare for turning on the camera.
We also have a set of usage scenarios around volume control. We currently have 4 different volumes which makes it tricky to decide which one (or ones) to modify when the user presses the volume buttons. Here's a set of situations where we need to figure out which volume to control:
* When on the home screen.
* When on the lock screen.
* When using the built-in alarm app.
* When running a 3rd party app which is currently playing "normal" audio. For example playing background music.
* When running a 3rd party app which on occasion plays sound effects.
* When running a 3rd party app which we don't yet know if it plays sounds or not.
* When using the built-in fmradio or music app and audio is playing.
* When using the built-in fmradio or music app and audio is not playing.
Confirmed users
716

edits