<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:12.666666984558105px">Hello, </span><div style="font-family:arial,sans-serif;font-size:12.666666984558105px"><br></div><div style="font-family:arial,sans-serif;font-size:12.666666984558105px">
I am using the <span class="" style="background-color:rgb(255,255,204)">Ogg</span> Vorbis library to encode PCM data into <span class="" style="background-color:rgb(255,255,204)">ogg</span> format. The conversion seems to work fine with the exception that the last little bit of audio appears cut off in each converted stream. </div>
<div style="font-family:arial,sans-serif;font-size:12.666666984558105px"><br></div><div style="font-family:arial,sans-serif;font-size:12.666666984558105px">I am essentially following the example from here:</div><div style="font-family:arial,sans-serif;font-size:12.666666984558105px">
<a href="http://svn.xiph.org/trunk/vorbis/examples/encoder_example.c" target="_blank">http://svn.xiph.org/trunk/vorbis/examples/encoder_example.c</a><br></div><div style="font-family:arial,sans-serif;font-size:12.666666984558105px">
<br></div><div style="font-family:arial,sans-serif;font-size:12.666666984558105px">When I added a "Sleep(5)" between writing the <span class="" style="background-color:rgb(255,255,204)">ogg</span> data to file, and clearing the <span class="" style="background-color:rgb(255,255,204)">ogg</span>/vorbis state structures, the <span class="" style="background-color:rgb(255,255,204)">ogg</span> output files were closer in length but still seemed somewhat shorter. I figured that I might have been interrupting the output but this seems like a hacky way of doing things. </div>
<div style="font-family:arial,sans-serif;font-size:12.666666984558105px"><br></div><div style="font-family:arial,sans-serif;font-size:12.666666984558105px">Is there a more proper way of solving this issue?</div><div>-Ilya Ganelin</div>
</div>