high resolution access to current time in tune

Posted by: jules

high resolution access to current time in tune - 30/03/2004 10:04

I'm reading the current time in the playing tune from offset 0x28 in /dev/empeg_state. I'm doing this 10 times per second, but I have noticed that the data is only updated once per second. Is this data updated more frequently anywhere else? Thanks!
Posted by: tonyc

Re: high resolution access to current time in tune - 15/04/2004 12:03

Nope. This was a real bummer for me in my developmental version of emphatic, since scrolling lyrics requires much better than 1-second resolution.

The best hack I was able to implement involves using my own offset timer which resets when the value in 0x28 changes, and is added to my own "track time" variable with each iteration of my program loop. It's ugly, but seems to do an okay job. So the resolution goes from 1-second to about 1/20 of a second in my case.
Posted by: jules

Re: high resolution access to current time in tune - 15/04/2004 16:22

Thats pretty clever.

I wish I could install a callback in the player software that would be fired when specific things happened (song ended, paused, resumed, new song playing, etc.), rather than having to query the state of things every so often...