HTML5 has two different systems for playing sounds: the older HTML5 Audio element and the newer Web Audio API. Which one should you use? For games, use the incredibly powerful Web Audio API. It loads sounds reliably, lets you play multiple sounds at the same time, and gives you precise playback control. In addition, it lets you apply effects, create your own synthesized sounds, and specify different kinds of input and output sources. Once you get over the small learning curve, you’ll be able to use the Web Audio API to quickly create any kind of sound system you can ...
© Rex van der Spuy 2015
Rex van der SpuyAdvanced Game Design with HTML5 and JavaScript10.1007/978-1-4302-5801-8_99. Sound with the Web Audio API
Rex van der Spuy1
(1)
Ontario, Canada
Get Advanced Game Design with HTML5 and JavaScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.