<div>Hi guys</div> <div> </div> <div>I succesfully got my encoder and decoder working after much hassles, but when I use the same code in another project, I get these following errors:</div> <div> </div><FONT size=2> <div align=left>Error ---> Invalid sideband mode encountered (1st sideband): 7</div> <div align=left>Error ---> Invalid sideband mode encountered (1st sideband): 7</div> <div align=left>Error ---> Invalid sideband mode encountered (1st sideband): 6</div> <div align=left>Error ---> More than two sideband layers found</div> <div align=left>Error ---> Invalid sideband mode encountered (1st sideband): 7</div> <div align=left>Error ---> Invalid sideband mode encountered (1st sideband): 6</div> <div align=left>Error ---> Invalid sideband mode encountered (1st sideband): 6</div> <div align=left>Error ---> Invalid sideband mode encountered. (2nd sideband): 6</div> <div align=left>Error ---> Invalid mode encountered:
10</div> <div align=left>Error ---> Invalid mode encountered: 12</div> <div align=left>Error ---> Invalid sideband mode encountered (1st sideband): 7</div> <div align=left>Error ---> Invalid sideband mode encountered (1st sideband): 5</div> <div align=left> </div> <div align=left>Therefore, because of this, i cannot decode. </div> <div align=left>Does anybody have an idea on fixing this error? I've attached parts of my code to ths email:</div> <div align=left> </div> <div align=left>//Declare the class</div><FONT size=2> <div>mySpeexEncDec </FONT><FONT color=#0000c0 size=2>test</FONT><FONT size=2> = </FONT><B><FONT color=#7f0055 size=2>new</B></FONT><FONT size=2> mySpeexEncDec ();</FONT></div> <div><FONT size=2></FONT> </div> <div><FONT size=2>//Decoding procedure</div></FONT></FONT><FONT size=2><B><FONT color=#7f0055 size=2> <div align=left>public</B></FONT><FONT size=2> </FONT><B><FONT color=#7f0055
size=2>static</B></FONT><FONT size=2> </FONT><B><FONT color=#7f0055 size=2>byte</B></FONT><FONT size=2>[] decode(</FONT><B><FONT color=#7f0055 size=2>byte</B></FONT><FONT size=2>[] decbuffer, </FONT><B><FONT color=#7f0055 size=2>int</B></FONT><FONT size=2> myBufferSize)</div> <div align=left>{</div> <div align=left>SpeexDecoder speexDecoder = </FONT><B><FONT color=#7f0055 size=2>new</B></FONT><FONT size=2> SpeexDecoder(); </div> <div align=left></FONT><B><FONT color=#7f0055 size=2>byte</B></FONT><FONT size=2>[] payload = </FONT><B><FONT color=#7f0055 size=2>new</B></FONT><FONT size=2> </FONT><B><FONT color=#7f0055 size=2>byte</B></FONT><FONT size=2>[</FONT><I><FONT color=#0000c0 size=2>FRAME_SIZE</I></FONT><FONT size=2>*2]; </div> <div align=left></FONT><B><FONT color=#7f0055 size=2>byte</B></FONT><FONT size=2>[] completebuffer = </FONT><B><FONT color=#7f0055 size=2>new</B></FONT><FONT size=2> </FONT><B><FONT color=#7f0055 size=2>byte</B></FONT><FONT
size=2>[4000000];</div> <div align=left></FONT><B><FONT color=#7f0055 size=2>int</B></FONT><FONT size=2> mode = 0;</div> <div align=left></FONT><B><FONT color=#7f0055 size=2>int</B></FONT><FONT size=2> samplerate = 8000;</div> <div align=left></FONT><B><FONT color=#7f0055 size=2>int</B></FONT><FONT size=2> channels = 1; </div> <div align=left></div> <div align=left></div> <div align=left>speexDecoder.init(mode, samplerate, channels, </FONT><B><FONT color=#7f0055 size=2>true</B></FONT><FONT size=2>); </div> <div align=left></FONT><B><FONT color=#7f0055 size=2>for</B></FONT><FONT size=2> (</FONT><B><FONT color=#7f0055 size=2>int</B></FONT><FONT size=2> packetCount = 0; packetCount < <I>getNbPackets</I>();packetCount++) </div> <div align=left>{ </div> <div align=left>System.<I>arraycopy</I>(decbuffer, packetCount*e<I>ncodedNbBytes</I>(), payload, 0, <I>encodedNbBytes</I>());</div> <div align=left></FONT><B><FONT color=#7f0055 size=2>try</B></FONT><FONT size=2>
</div> <div align=left>{ </div> <div align=left>speexDecoder.processData(payload,0, e<I>ncodedNbBytes</I>()); </div> <div align=left></FONT><B><FONT color=#7f0055 size=2>byte</B></FONT><FONT size=2>[] decoded = </FONT><B><FONT color=#7f0055 size=2>new</B></FONT><FONT size=2> </FONT><B><FONT color=#7f0055 size=2>byte</B></FONT><FONT size=2>[</FONT><I><FONT color=#0000c0 size=2>FRAME_SIZE</I></FONT><FONT size=2>*2]; </div> <div align=left></FONT><I><FONT color=#0000c0 size=2>decodedNbBytes</I></FONT><FONT size=2> = speexDecoder.getProcessedData(decoded, 0); </div> <div align=left>System.<I>arraycopy</I>(decoded, 0, completebuffer, packetCount*</FONT><I><FONT color=#0000c0 size=2>decodedNbBytes</I></FONT><FONT size=2>, </FONT><I><FONT color=#0000c0 size=2>decodedNbBytes</I></FONT><FONT size=2>);</div> <div align=left>} </div> <div align=left></FONT><B><FONT color=#7f0055 size=2>catch</B></FONT><FONT size=2>(StreamCorruptedException s) </div> <div align=left>{ </div>
<div align=left>System.</FONT><I><FONT color=#0000c0 size=2>out</I></FONT><FONT size=2>.println(</FONT><FONT color=#2a00ff size=2>"Error ---> "</FONT><FONT size=2>+s.getMessage()); </div> <div align=left>} </div> <div align=left>} </div> <div align=left></FONT><B><FONT color=#7f0055 size=2>return</B></FONT><FONT size=2> completebuffer; </div> <div>} </div> <div> </div> <div>encodedNbBytes is a function that returns the encoded packet size.</div> <div> </div> <div>help.</div> <div> </div> <div>Regards</div></FONT></FONT><p> 
                <hr size=1>Yahoo! Music Unlimited - Access over 1 million songs.
<a href="http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=36035/*http://music.yahoo.com/unlimited/
">Try it free.</a>