04-22-2011 12:39 PM
I added keyboard audible feedback to my calculator last night. I use an audio object with a tiny mp3 and use audioobject.play() in the ontouchend for the keyboard. It works ok but not as accurately as the os keyboard. It sometimes misses a sound when typing fast. Any way to make it spot on responsive? The palm webos api has a special low latency system call that makes these sounds effects have zero latency. Is something like that planned for WebWorks?
04-22-2011 04:09 PM
Yep, latest simulator. the latency in the simulator is significantly crappier than on a real device. That said, it's still there on the device and I'd like it not to be. This was the same on WebOS b.t.w. the only sounds that have zero latency are the ones played through that special system call. It's also a limited amount of built-in OS sounds. I'd be happy with that though. No problem using the stock keyboard sound.
04-25-2011 04:16 PM
The AudioPlayer has some problems with looping sounds with an unavoidable delay. These might be related. Also, are you initializing the Player object each time, or are you able to keep an object loaded and initialized at all times?
04-26-2011 07:01 PM
There's only one object and I simply call object.play() when needed.
It's WAY too laggy. Completely unsuitable for game sounds or keyboard feedback. The keyboard audio in my calculator sucks because of this lag.
I'm wondering if I should just take it out again before people start lowering their reviews because of this lag...
04-29-2011 02:12 PM
Can you confirm the lag is on the simulator only, or are you seeing the same results on a live device? I myself have noticed that content running in the PlayBook sim can appear to run slower than on a live device.
Although the same Tablet OS is used on both the live devices an sim, the sim is older and so may still have older bugs.
If do you suspect this is a defect, can you please get a defect logged https://www.blackberry.com/jira/secure/Dashboard.j
04-30-2011 01:17 AM - edited 04-30-2011 01:20 AM
The lag is horrible on the simulator and slightly less horrible on the real device. Still it's definitely there and people notice it. My app has very few event listeners but yet it manages to act quite laggy. Recently when I added sound this lag got amplified. When the user types somewhat fast (not ridiculously fast, just doable fast) the audio can't keep up with the keypresses which results in a pretty crappy experience. I wanted to add audio feedback to keypresses and expected it to be just as snappy as the built in keyboard. It's far from it.
Note that I have seen this exact same problem on Palm WebOS. The Palm solution to it was to offer a special API call that would play a sound from a limited set of predefined system sounds. For the PlayBook it would be awesome if there was such a call that would play the same sound you hear when using the regular keyboard on the PlayBook. This system call that Palm provided allowed me to have lag-free audio feedback when pressing keys.
Anyway, as you understand from this, it's not really a defect. It's just something that's a bit crappy in just about any browser, even desktop ones. So I suppose my request is more of a feature request rather than a bug/defect report.
So, ideally there would be some call in the WebWorks API that plays a system sound with 'top priority' when called. This would enormously enhance user experience in many apps that have their own on-screen keyboard.
05-01-2011 11:55 PM
More audio woes.
When using HTMLAudioObject.play() any music that may be playing in the background with the PlayBook music player STOPS?!?!
Filed a bug in the issue tracker: