Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Contributor
Posts: 3
Registered: ‎03-25-2013
My Device: 9800
My Carrier: Airtel

WEBWORKS AUDIO PROBLEM

[ Edited ]

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 .   Smiley Sad   . Anybody please help me.

 

 

Thanks in advance

Avinash

Highlighted
Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: WEBWORKS AUDIO PROBLEM

Hi there,

 

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:

https://github.com/blackberry/WebWorks-Community-APIs/tree/master/BB10-Cordova/LowLatencyAudio

 

And a sample of here:

https://github.com/blackberry/Cordova-Samples/tree/master/LowLatencySequencer

 

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.


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.