[Speex-dev] Calculate the audio duration of a speex file
n8thatcher at gmail.com
Thu Sep 4 14:04:07 PDT 2008
I am having some trouble calculating the duration of my speex files. I am
writing a speex player in Java and I am using the JSpeex port of the codec
which works but doesn't give me the audio duration which I need to show
progress or implement a scrubber. JSpeex appears to be all but dead but I
don't see any other option for Java playback.
I have tried the method posted here:
http://lists.xiph.org/pipermail/speex-dev/2006-May/004509.html but it looks
like I don't have direct access to the number of packets in the file. I am
currently reading through the entire speex file manually, finding the 'OggS'
tags and then applying an offset to get the page segments value for each
page. From here I am unsure how to get the actual number of packets in the
page which according to the link above I need.
I think I might be going about this the wrong way. How is the best way to
get the duration of the speex audio?
Thanks so much,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Speex-dev