<div dir="ltr">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. <br>
<br>I have tried the method posted here: <a href="http://lists.xiph.org/pipermail/speex-dev/2006-May/004509.html">http://lists.xiph.org/pipermail/speex-dev/2006-May/004509.html</a> 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.<br>
<br>I think I might be going about this the wrong way. How is the best way to get the duration of the speex audio?<br><br>Thanks so much,<br><br>Nate<br></div>