Wesley Leong
2004-Sep-10 16:45 UTC
[Flac-dev] how to determine total time of a flac sound file?
How do I determine the total time of a flac sound file by examining the blocks and headers in the file? I appreciate any help. _________________________________________________________________ MSN 8: advanced junk mail protection and 2 months FREE*. http://join.msn.com/?page=features/junkmail
Josh Coalson
2004-Sep-10 16:45 UTC
[Flac-dev] how to determine total time of a flac sound file?
--- Wesley Leong <wyleong321@hotmail.com> wrote:> How do I determine the total time of a flac sound file by examining > the > blocks and headers in the file? I appreciate any help.from the STREAMINFO block: if the total_samples field is not 0, then the length in seconds is total_samples / sample_rate. if it is 0, the length of the stream is unknown. you can use the metadata interface in libFLAC to get the values: http://flac.sourceforge.net/api/group__flac__metadata__level0.html or since the STREAMINFO block is always first you can get them from absolute offsets; see http://flac.sourceforge.net/format.html Josh __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com