<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:12.666666984558105px">Hello, </span><br><div class="gmail_quote"><div dir="ltr"><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 style="background-color:rgb(255,255,204)">Ogg</span> Vorbis library to encode PCM data into <span style="background-color:rgb(255,255,204)">ogg</span> format. The conversion seems to work fine with the exception that the first and last little bit of audio appears cut off in each converted stream. It's about .25 seconds that are lost. </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 style="background-color:rgb(255,255,204)">ogg</span> data to file, and clearing the <span style="background-color:rgb(255,255,204)">ogg</span>/vorbis state structures, the <span 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 style="font-family:arial,sans-serif;font-size:12.666666984558105px">
<br></div><div style="font-family:arial,sans-serif;font-size:12.666666984558105px">Please let me know, thanks!<span class="HOEnZb"><font color="#888888"><br>-Ilya Ganelin</font></span></div>
</div>
</div><br></div>