Track when AudioBufferSourceNodes start and stop playing.
chihuahua opened this issue · 0 comments
We should show when AudioBufferSourceNodes start and stop playing in the pane:
Maybe we could add a Play Status section to the pane for AudioBufferSourceNodes. This section could have 3 properties, perhaps start time (the absolute time at which the node starts playing), offset (at what point - seconds - into the buffer we start playing), and duration (how long in seconds the node played for).
This bug entails
-
overriding the
AudioBufferSourceNode.prototype.startmethod to issue a message when the node starts playing.
https://github.com/google/audion/blob/master/js/entry-points/tracing.js
The message's properties should be added to messages-extern.js:
https://github.com/google/audion/blob/master/externs/audion-specific-externs/messages-extern.js
The message's type should be added to this enumeration:
https://github.com/google/audion/blob/master/js/messaging/message-type.js -
Within tracing.js, listen for
AudioBufferSourceNodes to dispatch anendedevent to handle when the node stops playing: https://www.w3.org/TR/webaudio/#widl-AudioBufferSourceNode-onended -
adding a new category of widgets in the pane (a section in the pane) for Play Status:
https://github.com/google/audion/blob/795545d1692d11a0348556827622c997dbc9502e/js/ui/pane/audio-node-mode.js#L91
that only appears if the node is anAudioBufferSourceNode.
