From unit analysis, you have bits/second, and bytes, and want to get seconds, so multiply the bitrate by the number of bits in the file (convert bytes to bits), this leaves you with inverse seconds, (1/s), about useless, so take its inverse to get to seconds over 1, or just plain old seconds.
That said, can you borrow code from one of the players to ask the ID3 tag how long the file is? Does the file itself even know how long it is?
Scott
|