Re: Changing the sample rate of the audio device

> Sounds like a reasonable approach to me. We want the audio output to be
> uninterrupted if the audio settings change during playback. Especially
> in cases where a user just plugs in headphones. But there are also
> situations where we can switch to a new context if we would get a
> notification for changed settings. During playback we could set a flag
> and create a new context as soon as possible. For example when the user
> stops playback.

In case you are switching from local speakers to headphones, you are 
really sending the same stream to the same low-level driver, and the 
switch is typically handled in the audio codec hardware. You will have 
continuity of the playback by construction, and the only time you'd need 
to reconfigure the graph is if you have any sort of 3D positioning.
But if the new output is HDMI, Bluetooth A2DP, USB, there will be a 
delay and volume ramps when switching, and it'd be perfectly acceptable 
to stop and reconfigure without any impact to user experience. It'd be 
interesting to capture this difference in the notification.
-Pierre

Received on Wednesday, 13 March 2013 16:02:02 UTC