to calculate the Time of Playing an Audio file
-
plz can any one help me in calculating the time, that will be taken in playing the audio file using c or vc++ program.
-
plz can any one help me in calculating the time, that will be taken in playing the audio file using c or vc++ program.
Near the beginning of the file is some header information. One of the fields is the average bytes per second (i.e., sampling rate). Divide this into the size of the file to get the approximate play time. For example, the The Microsoft Sound.wav file is 135,876 bytes in size and has a sampling rate of 22.50 kHz, which yields 6.038 seconds. Opening that same file with Sound Recorder shows that it is 6.12 seconds in length. Does that help?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen