MadSc13ntist Posted June 2, 2006 Posted June 2, 2006 (edited) I have been trying to figure out how to calculate the play duration of a WAV file. One of my problems is that it isn't PCM it's GSM 6.10. A sample of one of the WAV files i am working with is: file size: 561,152 bytes (on disk) Bit Rate: 13kbps Channels: 1 (mono) Audio sample rate: 8kHz Audio Format: GSM 6.10 I was told for PCM one can use: filesize / bytespersecond but I have seen this is not the case for GSM. I would greatly appreciate any help someone could throw my way, If I find an answer before a reply is made I will be sure to post it for everyone. Thanks in advance. Edited June 2, 2006 by MadSc13ntist
MadSc13ntist Posted June 2, 2006 Author Posted June 2, 2006 (edited) Figured it out. filesize_in_bytes / 1625.15 pretty close, accurate within a few hundredths of a second. here is the tiny script I used to proof it. Dim $file = @DesktopDir&'\Test1.wav' $filesize = FileGetSize($file) MsgBox(64,'GSM 6.10 duration calc.', Round($filesize / 1625.15, 2)&' seconds.') Edited June 2, 2006 by MadSc13ntist
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now