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 <caroundw5h@yahoo.com></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> <br> for(i=0; i<samples;i++){<br> /*only get max 320 bytes at a time so bits can handle*/<br> Client->raw_audio[i] = *input++; <br> Client->temp_audio[i] = Client->raw_audio[i];<br>
Client->session_File[ndx] = Client->temp_audio[i];<br> ndx+=1;<br> } <br> speex_bits_reset(&ebits);<br> <br> speex_encode_int(enc_state,Client->temp_audio,&ebits);<br><br> Client->nBytes = speex_bits_write(&ebits,Client->encoded_audio, samples);<br><br> speex_bits_read_from(&dbits,Client->encoded_audio,Client->nBytes);<br><br> /*decode from dbits to raw_audio*/<br> speex_decode_int(dec_state,&dbits,Client->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 <jean-marc.valin@usherbrooke.ca></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>> Hi,<br>> i have some code that gives me a "warning: Buffer too small to pack bits"<br>> mesage. looking at the libspeex source/bits.c i see the warning in a <br>> a function named speex_bits_pack. i'm not using this function.<br>> <br>> can someone tell me where this may be coming from since i've had a <br>> similiar problem before and had that fixed. i can't seem to pinpoint this<br>> one.<br>> <br>> thanks<br>> Greg<br>> <br>> <br>> ---------------------------------<br>> It's here! Your new message!<br>> Get new email alerts with the free Yahoo! Toolbar.<br>> <br>> <br>> ------------------------------------------------------------------------<br>> <br>> _______________________________________________<br>> Speex-dev mailing list<br>> Speex-dev@xiph.org<br>>
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> 
<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.