--- Wesley Leong <[EMAIL PROTECTED]> 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


-------------------------------------------------------
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
_______________________________________________
Flac-dev mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/flac-dev

Reply via email to