07-17-2013 05:49 AM - edited 07-17-2013 05:52 AM
Scucessfully completed my game. Now adding event sounds to my game. Facing lots of problems here with audio. I am testing my game in Physical playbook device. while testing, sound is playing well at first . but it is playing multiple times from second time. And game is also freezing little bit when sound is playing and running smooth when sound is off . searching for solution. Spent nearly 2 months to complete my game. But now audio is killing me . . Anybody please help me.
Thanks in advance
07-23-2013 01:38 PM
Unfortunately HTML5 Audio can be a challenge for some game implementations. We're working on a few platform-level fixes to help address the issue (among other things, Web Audio API.) Today, if you are willing to go the Cordova route, we have ported the PGLowLatencyAudio plugin which you can find here:
And a sample of here:
The plugin ties into OpenAL which alleviates essentially all of the current HTML5 Audio latency and playback issues. The sample also provides a wrapper that is intended to help bridge the gap between an HTML5 Audio implementation and the plugin which may help avoid needing to rewrite any code to access the plugin.
Alternatively, if you are determined to stick with HTML5 Audio, compressing the audio files as much as possible and preloading the audio files before playback are the two biggest recommendations I can make in helping improve the performance there.