Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#211495 - 30/03/2004 10:04 high resolution access to current time in tune
jules
member

Registered: 21/01/2002
Posts: 174
Loc: Indiana USA
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!

Top
#211496 - 15/04/2004 12:03 Re: high resolution access to current time in tune [Re: jules]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
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.
_________________________
- Tony C
my empeg stuff

Top
#211497 - 15/04/2004 16:22 Re: high resolution access to current time in tune [Re: tonyc]
jules
member

Registered: 21/01/2002
Posts: 174
Loc: Indiana USA
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...

Top