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 Developer
Posts: 105
Registered: ‎06-11-2013
My Device: DEVELOPER
My Carrier: vodafone
Accepted Solution

sound delay

hey,

i had used certain sounds on button click for my app but was reported "When I open the app and tap on the tunes, it has delayed respond. The sound is delayed. In addition, the image is zoom in every time it tapped twice."

any methods to solve this?

******Blackberry Developer*******---Built for the Kill-----
#######Developer of @Sudoku#########
BlackBerry Development Advisor
Posts: 769
Registered: ‎10-01-2009
My Device: All
My Carrier: N/A

Re: sound delay

The sound could be delayed for many different reasons.  What happens in the onclick event? Prehaps you're executing a lot of code/logic which is holding up the application?

 

Regarding the image zooming, it sounds like the viewport of the application isn't setup.  More info here: http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/How-to-set-up-the-viewport-for-a...

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

Re: sound delay

Another consideration regarding sound; are you preloading the audio so that it's ready to play on the click event? If not, and you are creating a new audio object / loading the src onclick, especially if the file is large, then there will likely be some delays as the application must do some processing before it can play.

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.
Developer
Posts: 1,230
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: sound delay

As erik says you need a pre-load

 

Basically you wanna load all sound on load




Click the like button if you find my posts useful!
Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: sound delay

[ Edited ]

If you are willing to give the Cordova tools a try, we recently released a PGLowLatencyAudio plugin port for BlackBerry 10:

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

 

There is a sample application that uses the implementation here:

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

 

As the plugin ties directly to native OpenAL code, latency is drastically reduced.

 

 

Edit: To disable the zoom on double-tab, you will need to set the user-scalable property of the <meta> viewport to no. Information on this can be found here:

http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/How-to-set-up-the-viewport-for-a...


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.