get total time (s) for wave file ?

hiii,all:
get total time (s) for wave file in advance .
just like :
when opening a wave file, i can get total time (play wave file time)


thanks a lot
regards nora_taojie

Comments

  • To get the total reading time of a wave file you have to read the headers of the wave file format. Those headers are really easy to decode and you will have no problem on finding the details of those headers on the net (google search with "wave file format" will do the job).

    Once you can read those headers you will be able to
    obtain the total number of samples of the wave. You can then divide this total number by the sample rate (also written in the headers of the file) and get the total playing time.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion