09-06-2013 02:04 AM
Hello everyone, I hope somebody knows about this issue.
I recently posted an app built in sencha: http://appworld.blackberry.com/webstore/content/33
I am having an issue with the audio feature, it seems that the sound is crashing the app on some devices. I tested the app on the Blackberry Dev Alpha B, and it worked perfectly, but a friend told me that the app is crashing on Q10. I am using audio in OGG format, the last firmware for Dev Alpha B, and the last sencha version.
I found that the audio has to be longer than 300ms to play properly. If you use a sound less than 300ms, then the sound present interference and in some cases it repeats two or three times in the same touch.
I can not reproduce the bug because I have no Q10, sencha is using audio tag of HTML5, so the behavior could be reproduced using:
<audio src="audio.wav" id="test">
Any ideas about this?
Thank you for your time
Solved! Go to Solution.
09-08-2013 03:40 PM
Hello, I was able to solve my problem, I am sharing you what I found:
Sound is playing twice when pressing the button.
Use a sound longer than 300 milliseconds.
Sound stutter using tones.
Do not use sine wave in tones, instead use rectangular waves.
INVALID_STATE_ERR: DOM Exception 11: An attempt was made to use an object that is not, or is no longer, usable. When playing sounds.
Create a new Audio object every time you want to play a sound. This fix may cause an impact on the performance of the application while playing sounds:
var audio = new Audio('path/to/audio.ogg');