playground icon indicating copy to clipboard operation
playground copied to clipboard

Sound events

Open karneaud opened this issue 7 years ago • 2 comments

Do I have access to any of the sound events? I need to trigger actions based on time update or play/ stop

karneaud avatar Apr 03 '17 00:04 karneaud

You should build something custom on top of WebAudioAPI - it's rather simple and it will give you a full control over the sound. Also I would not rely on any events coming from Audio - I would rather hold lengths of the sounds somewhere and call what's needed using setTimeout or tracking delta. Sound is there to reinforce the UX and building game logic upon sound API is asking for troubles.

rezoner avatar Apr 10 '17 12:04 rezoner

Will this is a killjoy...I need sound events to drive my game. I've tried p5js which has a nice sound api but its Implementation lacks some compatibility. But I know what I want to do can be achieved.

karneaud avatar Apr 11 '17 00:04 karneaud