GoogleChrome/audion

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:

audiobuffersourcenode

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

  1. overriding the AudioBufferSourceNode.prototype.start method 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

  2. Within tracing.js, listen for AudioBufferSourceNodes to dispatch an ended event to handle when the node stops playing: https://www.w3.org/TR/webaudio/#widl-AudioBufferSourceNode-onended

  3. 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 an AudioBufferSourceNode.