PDA

View Full Version : Jive events and sound effect timing



rtitmuss
2007-09-26, 12:45
A few bugs relate to the jive sounds effects, sometimes they play at in appropriate moments or they are not timely with respect to button presses. In particular this is a problem with the 'forward', 'back' and 'bump' sounds. Currently they are played with window transitions, and not when the key presses happen. The transition may happen without a key press (for example the flickr applet), or may be slightly delayed from the key press (for example when fetching data from the network).

I think ideally the playback of the sound effect needs to be moved to the event main event processing, and done before any widget callbacks happen so the sound is more timely with the key press. The problem with this is often the callback will determine what sound effect should be played, for example the menu callback determines if a new window is being pushed or a bump should happen.

So to achieve the desired effect the existing way events are processed in Jive needs to be modified. At the moment event handlers can be registered for key type events, for example a 'key press' event. I think this needs to be finer grained, so that a handler would be registered for a 'play key press' event. Along with the handler an optional sound effect could be included, this sound effect would be played before the handler is called providing more timely feedback. Only one handler per event per widget would be supported. If needed widgets could be chained together by the application. Given a typical widget hierarchy of 'Window > Menu > Label' then the event processing would start with the Label. If no event handler was registered, then Menu would be checked and finally Window. The global event handlers would still need to allow processing on any key press, for lock screen, screensavers, power saving, etc. I have not yet thought how that would be incorporated.

This change would remove several if/then/else ladders for event processing and result in more functions/closures. The event processing would then mainly be a table look up. This may result in a modest speed up, but current profiling suggests the layout/drawing code is the biggest overhead on ARM so the impact on performance will be small.

Any suggestions or comments?

pfarrell
2007-09-26, 13:25
A pretty obvious comment:

Adding sounds to events makes the UI better, only when they actually happen with the event is triggered. It can be nice positive feedback.

So far, the latency really mangles the experience, so making it be more in sync is a Really Good Thing (tm)

I also notice some strange squeaks and squacks coming from the remote while I listen to music. I haven't correlated when they happen, but its a very bad distraction during serious listening. I'll pay more attention tonight.

Cruzan
2007-09-26, 13:46
It's actually fine for me either way, as long as it's consistent.

I was just thinking the exact opposite for one case - dropping the remote into the charger. If I drop it in, it rocks and makes a couple of connections, and then does the "I'm charging now" sound a few times in a row. A simple solution would be to make the charging sound much shorter and subtler.

rtitmuss
2007-09-26, 13:49
I was just thinking the exact opposite for one case - dropping the remote into the charger. If I drop it in, it rocks and makes a couple of connections, and then does the "I'm charging now" sound a few times in a row. A simple solution would be to make the charging sound much shorter and subtler.

This is a different problem, we need some debounce code added to the ac detect in the kernel. It should only make that sounds once when you put it on the cradle.

Craig
2007-09-27, 15:16
I think it's important to give consistant feedback too. I have a cordless phone that beeps when you release the key!!! I was a beta tester for that too but they ignored me :-)

A volume control for the sound effects may be a usefull addition though.

Craig

oreillymj
2007-09-28, 02:41
Yes, while the cradle could be made a snugger fit for the remote, I wouldn't want wear-n-tear marks or scratches. Some rubber buffers on the inside-bottom of the cradle might help.

I would agree that the beep feedback does not happen quick enough.

oreillymj
2007-09-28, 02:56
It would seem that the measurements from the accelerometers is too sensitive. With remote beside me on the couch, very slight movements by me are enough to cause vibrations that wake the remote.

It also clicks occasionally during song playback. Something to do with the refresh of the playback status bar.

What flickr applet?