[web-audio-api] Loop event (#267)

I have a suggestion regarding the AudioBufferSourceNode. At present there is only a single event to inform you when the buffer has finished playback which is useful in some scenarios. When in loop mode however there is no event to do the equivalent for generating an event once the loop point has been reached.

The ability to know when the loop point has been reached would be useful for use in logic that limits the number of playback loops to predefined value. There may be other use cases such as a visual indication that the loop has been triggered.

It may be possible to use polling to do an equivalent task but if the loop is quite short in duration and the polling function is delayed due to an activity like garbage collection occurring it could lead to opportunity to disable the loop at the correct point being missed.

---
Reply to this email directly or view it on GitHub:
https://github.com/WebAudio/web-audio-api/issues/267

Received on Tuesday, 22 October 2013 20:32:55 UTC