Re: Changing the sample rate of the audio device

On Mon, Mar 11, 2013 at 9:42 AM, Pierre-Louis Bossart <
pierre-louis.bossart@linux.intel.com> wrote:

>
>      Is there anything I can do about this in an application using Web
>>     Audio API? Is there a way to detect the changed settings? Or is it
>>     just a deficiency in WebKit?
>>
>
>  This is really something to be handled at the user-agent level.  For
>> example, if an <audio> element is playing under the same circumstances
>> then it would be expected to adapt to the new hardware sample-rate.  So
>> ideally we'd like to have the AudioContext continue playing, adapting to
>> the new hardware internally.  I think it would be best in these types of
>> cases for the AudioContext to continue to operate at the sample-rate it
>> was created with, and that the user-agent simply does the appropriate
>> sample-rate conversion.
>>
>
> Is there really a consensus on this?
> When changing accessories, both sampling rate and max number of channels
> can change. If the sampling rate change is handled internally, would the
> change in # of channels be hidden as well? Changing channels mostly has an
> impact on virtualization and 3D positioning, you wouldn't use the same
> settings and algorithms when switching from headset to speakers.


Agreed.  I expect the .maxChannelCount would potentially be updated.  We
could also consider a notification...


>
> -Pierre
>
>

Received on Monday, 11 March 2013 17:05:33 UTC