[Speex-dev] Invalid sideband mode encountered
Thabang Kevin Khanye
tkkhanye at yahoo.com
Thu Jul 20 00:09:43 PDT 2006
Hi guys
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:
Error ---> Invalid sideband mode encountered (1st sideband): 7
Error ---> Invalid sideband mode encountered (1st sideband): 7
Error ---> Invalid sideband mode encountered (1st sideband): 6
Error ---> More than two sideband layers found
Error ---> Invalid sideband mode encountered (1st sideband): 7
Error ---> Invalid sideband mode encountered (1st sideband): 6
Error ---> Invalid sideband mode encountered (1st sideband): 6
Error ---> Invalid sideband mode encountered. (2nd sideband): 6
Error ---> Invalid mode encountered: 10
Error ---> Invalid mode encountered: 12
Error ---> Invalid sideband mode encountered (1st sideband): 7
Error ---> Invalid sideband mode encountered (1st sideband): 5
Therefore, because of this, i cannot decode.
Does anybody have an idea on fixing this error? I've attached parts of my code to ths email:
//Declare the class
mySpeexEncDec test = new mySpeexEncDec ();
//Decoding procedure
public static byte[] decode(byte[] decbuffer, int myBufferSize)
{
SpeexDecoder speexDecoder = new SpeexDecoder();
byte[] payload = new byte[FRAME_SIZE*2];
byte[] completebuffer = new byte[4000000];
int mode = 0;
int samplerate = 8000;
int channels = 1;
speexDecoder.init(mode, samplerate, channels, true);
for (int packetCount = 0; packetCount < getNbPackets();packetCount++)
{
System.arraycopy(decbuffer, packetCount*encodedNbBytes(), payload, 0, encodedNbBytes());
try
{
speexDecoder.processData(payload,0, encodedNbBytes());
byte[] decoded = new byte[FRAME_SIZE*2];
decodedNbBytes = speexDecoder.getProcessedData(decoded, 0);
System.arraycopy(decoded, 0, completebuffer, packetCount*decodedNbBytes, decodedNbBytes);
}
catch(StreamCorruptedException s)
{
System.out.println("Error ---> "+s.getMessage());
}
}
return completebuffer;
}
encodedNbBytes is a function that returns the encoded packet size.
help.
Regards
---------------------------------
Yahoo! Music Unlimited - Access over 1 million songs.Try it free.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20060720/63648879/attachment.html
More information about the Speex-dev
mailing list