keeping track of time in a sound file

How do you keep track of time in a sound file?

I'm creating a class that will mark down in an array the key I press and the time I press it in relation to the sound file. Long story short, it's an event flagger based upon the timestamp of the sound file.

The sound files used may be mp3, wav, or maybe even other sound file.

Is a long the way to go for storing time for a sound file?

Note that i'm looking for the time to be stored in a format that is the simplest to directly plug into the program. Aka be able to plug it into a function and say go to frame 12345 or however time is stored in wav/mp3 files.

Thanks
Topic archived. No new replies allowed.