Audio Triggering + Mouse Event latency

Anthony Howe anthonyhowe at mac.com
Mon Nov 15 23:59:01 EST 2010


Hiya Folks,

Further to our recent emails on this...

I've now just implemented the same functionality using keyboard on keyDown events for each sound instead of the mouseDown event with startling (positive) results. (thanks Jacqueline for suggestion!)

It seems that the keyDown event arrives into LC much faster than a mouseDown event does for the purpose of triggering audio on a real time basis. Slightly less responsive on WinXP, but fantastic on OSX.

I've even been able to nest the keyDown handler at the card level and run a conditional before triggering the sound in order to get the right one, without affecting playback too much.

Whilst this is still not an ideal UI position to be in, and will limit the features we can provide onscreen, at least it's clearer that the issue probably revolves around considerable internal latency with capture of the mouseDown event, in comparison to its 'keyDown' counterpart.

If there's any way of tweaking the mouseDown event speed into LC, (assuming that IS actually the problem) it'd be great to provide this dual benefit to our users.

Looks like we may be able to avoid the flash/swf implementation by using keyboard events directly into LC though.... so a solution seems close.

Any thoughts based on that discovery folks?

Cheers,

A.


More information about the use-livecode mailing list