Hey, just trying to calculate the position of a song in seconds.
I'm assuming musiclen and musicpos are in bytes? not bits?
So it's either /1024 or /1000 not sure.
Anyway, iv'e tried a few things.
This seemed the most logical but failed.
PHP Code:
temp.mp = musicpos; //Current position, assuming it's the current byte you're at.
temp.ml = musiclen; //Total bytes.
temp.bitrate = 128; //The bit rate of the song, needed to get seconds.
temp.mps = musicpos/1024/bitrate/60; //Should be the second you're at.
Any advice?