This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 21345 - There should be notification when the destination output changed
Summary: There should be notification when the destination output changed
Status: CLOSED WONTFIX
Alias: None
Product: AudioWG
Classification: Unclassified
Component: Web Audio API (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: TBD
Assignee: Chris Rogers
QA Contact: public-audio
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-20 06:04 UTC by Wei James
Modified: 2014-10-28 17:17 UTC (History)
1 user (show)

See Also:


Attachments

Description Wei James 2013-03-20 06:04:34 UTC
When changing accessories, the max number of channels can change, which has an impact on virtualization and 3D positioning, you wouldn't use the same settings and algorithms when switching from headset to speakers.

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.
Comment 1 Wei James 2013-04-09 01:03:38 UTC
one proposal:


enum OutputType {
    “speakers”,
    “headset”
};


interface AudioDestinationChangeEvent : Event {
    readonly attribute double float sampleRate;
         readonly attribute unsigned long maxChannelCount
    readonly attribute OutputType outputType;
};
Comment 2 Ehsan Akhgari [:ehsan] 2013-04-09 01:46:10 UTC
Why would we expose the sample rate in this way?

Also, I assume that you're planning to extend OutputType in the future, right?
Comment 3 Wei James 2013-04-10 08:29:02 UTC
(In reply to comment #2)
> Why would we expose the sample rate in this way?
> 
> Also, I assume that you're planning to extend OutputType in the future,
> right?

yes, OutputType should be extendable. 

for sample rate, do you have any idea for output change?
Comment 4 Ehsan Akhgari [:ehsan] 2013-04-15 01:45:12 UTC
Why should the web application change about the sampling rate change?  Is it not reasonable to expect the implementation to handle any resampling if needed?
Comment 5 Olivier Thereaux 2014-10-28 17:14:33 UTC
Web Audio API issues have been migrated to Github. 
See https://github.com/WebAudio/web-audio-api/issues
Comment 6 Olivier Thereaux 2014-10-28 17:17:24 UTC
Closing. See https://github.com/WebAudio/web-audio-api/issues for up to date list of issues for the Web Audio API.