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 21862 - [AudioContext]: 'activeSourceCount' should return number of all active Source nodes
Summary: [AudioContext]: 'activeSourceCount' should return number of all active Source...
Status: CLOSED WONTFIX
Alias: None
Product: AudioWG
Classification: Unclassified
Component: Web Audio API (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: TBD
Assignee: Chris Rogers
QA Contact: public-audio
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-29 02:11 UTC by Praveen R Jadhav
Modified: 2013-07-05 09:38 UTC (History)
2 users (show)

See Also:


Attachments

Description Praveen R Jadhav 2013-04-29 02:11:32 UTC
'activeSourceCount' should return no. of active AudioBufferSourceNodes, OscillatorNodes and ScriptProcessoreNodes(this can generate audio too) at any given time. Current WebKit code returns no. of active AudioBufferSourceNodes and OscillatorNodes.
Comment 1 Ehsan Akhgari [:ehsan] 2013-05-07 00:30:57 UTC
We are planning to remove the activeSourceCount property from AudioContext.  Its functionality can be implemented in Javascript by handling the "ended" event on AudioBufferSourceNodes.
Comment 2 Praveen R Jadhav 2013-05-07 13:17:37 UTC
Thanks Ehsan. I can see that "ended" event is added in AudioBufferSourceNode and OscillatorNode IDL. But MediaElementAudioSourceNode and MediaStreamAudioSourceNode too are source nodes and should also include this event. 
Better way should be sending "ended" event from AudioSourceNode IDL(Dummy implementation already available in WebKit) and inherit this in other source nodes, IMO.
Comment 3 Ehsan Akhgari [:ehsan] 2013-05-07 13:25:24 UTC
(In reply to comment #2)
> Thanks Ehsan. I can see that "ended" event is added in AudioBufferSourceNode
> and OscillatorNode IDL. But MediaElementAudioSourceNode and
> MediaStreamAudioSourceNode too are source nodes and should also include this
> event. 

HTMLMediaElement and MediaStream both have their own ended events which can be used for this purpose.

> Better way should be sending "ended" event from AudioSourceNode IDL(Dummy
> implementation already available in WebKit) and inherit this in other source
> nodes, IMO.

FWIW AudioSourceNode has also been removed from the spec, and it should be removed from WebKit as well.
Comment 4 Olivier Thereaux 2013-07-05 09:38:12 UTC
Closing.