Currently not too sure about Web Audio myself, but I came across this exciting stuff in the AudioBufferSourceNode specification:
[quote:3n5a7ous]
AudioBufferSourceNode.loopStart
Is a double value indicating, in seconds, where in the AudioBuffer the restart of the play must happen. Its default value is 0.
AudioBufferSourceNode.loopEnd
Is a double value indicating, in seconds, where in the AudioBuffer the replay of the play must stop (and eventually loop again). Its default value is 0.
Okay, I'm fairly certain the Audio object uses AudioBufferSourceNode. So somebody should be able to hack it in (I'm not the best, but I'm trying...).
PROGRESS:
- Got it to loop using the loop start! The song has to be played as a Sound for this to work, since Music doesn't use the Web Audio API. Testing some more stuff out, and then I'll post up a new Audio object here with some looping functions.
- Bad News: It didn't work for me in mobile through Cocoon Canvas+, since it's using normal HTML-5 Audio, not the Web Audio API. so for my purposes this particular hack won't work. Still going to mess around some more and see if I can get anything working in Canvas+.