Angry Birds Chrome now uses the Web Audio API

Posted by Fred Sauer, Developer Advocate - Tuesday, January 31, 2012 at 2:15:00 PM

Cross-posted with the Google Code Blog

Last week Angry Birds for Chrome was updated to use the Web Audio API for all its in-game audio for Chrome users, which means Chrome users get the full Angry Birds experience, without any plugins. The Web Audio API supports a wide variety of use cases, including the high fidelity and low latency requirements of games. Users of other supported browsers will still get sound via Flash or HTML5 audio.


How does this cross-browser audio magic work? As you may have seen or heard, Angry Birds was in no small part made possible by the cross-platform open source PlayN library. When building for the HTML platform, PlayN in turn relies heavily on Google Web Toolkit (GWT) to delivery a highly optimized web experience for users, and on gwt-voices to easily deliver a cross-browser audio experience.

The responsibility of choosing the appropriate audio API for the game's sound is (mostly) left up to gwt-voices, which chooses the audio API that will give the best experience. If you'd like to hear how other audio APIs perform, you can ask gwt-voices to try to use the Web Audio API, Flash, HTML5 Audio, or even native audio. Your mileage will vary by browser and platform and which plugins you have installed. Also, gwt-voices will select the best available fallback, if the desired audio API is not going to work at all in your environment.

Want to learn more? Check out the Web Audio API tutorial and don't let those pigs grunt too much.

No comments: