found the error. <br><br>it was simply that i didn't init the bits structures. plain and simple.<br>thus it caused it to seg fault and crash. a nice cleanup and exiting function <br>would be nice. the code caused a core dump and a "BSOD" <br>on windows. mine was really green though since i have a gateway <br>and it crashes with any color in the spectrum. ;)<br><br>thanks for trying though.<br>greg<br><br><b><i>Greg &lt;caroundw5h@yahoo.com&gt;</i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> i don't think so. this is my current code:<br>&nbsp;<br>&nbsp;&nbsp;&nbsp; for(i=0; i&lt;samples;i++){<br>&nbsp;&nbsp; /*only get max 320 bytes at a time so bits can handle*/<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Client-&gt;raw_audio[i] = *input++;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Client-&gt;temp_audio[i] = Client-&gt;raw_audio[i];<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 Client-&gt;session_File[ndx] = Client-&gt;temp_audio[i];<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ndx+=1;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } <br>&nbsp;&nbsp;&nbsp;&nbsp; speex_bits_reset(&amp;ebits);<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; speex_encode_int(enc_state,Client-&gt;temp_audio,&amp;ebits);<br><br>&nbsp;&nbsp;&nbsp; Client-&gt;nBytes = speex_bits_write(&amp;ebits,Client-&gt;encoded_audio, samples);<br><br>&nbsp;&nbsp;&nbsp; speex_bits_read_from(&amp;dbits,Client-&gt;encoded_audio,Client-&gt;nBytes);<br><br>&nbsp;&nbsp;&nbsp; /*decode from dbits to  raw_audio*/<br>&nbsp;&nbsp;&nbsp; speex_decode_int(dec_state,&amp;dbits,Client-&gt;raw_audio);<br><br><br>i did move the reset function to before the for loop to test. but it still crashed.<br><br><b><i>Jean-Marc Valin &lt;jean-marc.valin@usherbrooke.ca&gt;</i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> Are you encoding frames
 one after the other without reseting the<br>bit-packer by any chance?<br><br> Jean-Marc<br><br>Greg a écrit :<br>&gt; Hi,<br>&gt; i have some code that gives me a "warning: Buffer too small to pack bits"<br>&gt; mesage. looking at the libspeex source/bits.c i see the warning in a <br>&gt; a function named speex_bits_pack. i'm not using this function.<br>&gt; <br>&gt; can someone tell me where this may be coming from since i've had a <br>&gt; similiar problem before and had that fixed. i can't seem to pinpoint this<br>&gt; one.<br>&gt; <br>&gt; thanks<br>&gt; Greg<br>&gt;  <br>&gt;  <br>&gt; ---------------------------------<br>&gt; It's here! Your new message!<br>&gt; Get new email alerts with the free Yahoo! Toolbar.<br>&gt; <br>&gt; <br>&gt; ------------------------------------------------------------------------<br>&gt; <br>&gt; _______________________________________________<br>&gt; Speex-dev mailing list<br>&gt; Speex-dev@xiph.org<br>&gt;
 http://lists.xiph.org/mailman/listinfo/speex-dev<br>_______________________________________________<br>Speex-dev mailing list<br>Speex-dev@xiph.org<br>http://lists.xiph.org/mailman/listinfo/speex-dev<br></blockquote><br><div>        </div><hr size="1">Shape Yahoo! in your own image.   <a href="http://us.rd.yahoo.com/evt=48517/*http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7">Join our Network Research Panel today!</a> _______________________________________________<br>Speex-dev mailing list<br>Speex-dev@xiph.org<br>http://lists.xiph.org/mailman/listinfo/speex-dev<br></blockquote><br><p>&#32;
      <hr size=1><a href="http://us.rd.yahoo.com/evt=48250/*http://searchmarketing.yahoo.com/arp/sponsoredsearch_v9.php?o=US2226&cmp=Yahoo&ctv=AprNI&s=Y&s2=EM&b=50">Pinpoint customers </a>who are looking for what you sell.