<div dir="ltr">Hey there =]<br><br>I intend to develop a voip application using the Jspeex (Java implementation of Speex) library.<br>At this point, the progrm can capture the voice from the microphone to an "ByteArrayOutputStream" object and play it back.<br>
I`m willing to add the encode\decode features of Jspeex but I can't make it to work, I`m probably missing somethnig.<br>The code (Part of it) :<br>-----<br> speexEnc = new SpeexEncoder();<br> <br> speexEnc.init(0, 5, 8000, 1); //narrrow-band, 5 quallity, 8khz, 1 channel<br>
<br>speexEnc.processData(buff, 0, buff.length); // 0 - the offset<br><br>---<br><br>buff is the byte array of the ByteArrayOutputStream (=the voice from the microphone).<br>the exception I get from processData() method is:<br>
<b>"Insufficient float buffer to convert the samples"</b>, and this leads me to the question.<br>Is it true that this type of encoding, can encode only 320byte? because the size of the buff array is much bigger (I mean, huge).<br>
Maybe I need a loop that gives to the processData() only 320byte each interval?<br><br>thank you very much.<br><br><br></div>