Re: stability of AudioBufferSourceNode.playbackState, and activeSourceCount

crogers, do you have any feedback regarding this?  I am fairly strongly
against having playbackState change its value before the script yields
execution to the main event loop, as it implies that the implementation
will need to lock on the audio thread.  And without that property,
playbackState as currently spec'ed is fairly useless since there will be no
guarantee whether its value when queried reflects the reality (that is, if
it returns PLAYING or FINISHED.)  I would like to propose that this
attribute (and activeSourceCount for the exact same fundamental reason)
should be removed from the spec.

Cheers,

--
Ehsan
<http://ehsanakhgari.org/>


On Mon, Oct 29, 2012 at 7:26 AM, Robert O'Callahan <robert@ocallahan.org>wrote:

> AudioBufferSourceNode.playbackState is described as being changed by the
> start() method (i.e. synchronously on the HTML5 event loop thread) and then
> being changed due to audio processing (i.e. NOT on the HTML5 event loop
> thread). How are changes to PLAYING_STATE and FINISHED_STATE reflected to
> the HTML5 event loop thread? Is it supposed to be possible for script to
> check playbackState one moment and see SCHEDULED_STATE, then a moment later
> (without returning to the event loop) to check it again and see
> PLAYING_STATE? I hope not, for that would make playback states other than
> UNSCHEDULED and SCHEDULED pretty much impossible to use correctly.
>
> Hmm, actually, what are the use-cases for playbackState? I can't tell what
> it could be safely used for.
>
> activeSourceCount has similar issues, since it counts the playing
> AudioBufferSourceNodes. Is it supposed to change at arbitrary times? What
> are the use-cases for activeSourceCount anyway?
>
> Rob
> --
> Jesus called them together and said, “You know that the rulers of the
> Gentiles lord it over them, and their high officials exercise authority
> over them. Not so with you. Instead, whoever wants to become great among
> you must be your servant, and whoever wants to be first must be your
> slave — just as the Son of Man did not come to be served, but to serve,
> and to give his life as a ransom for many.” [Matthew 20:25-28]
>
>

Received on Tuesday, 19 March 2013 03:12:37 UTC