[Speex-dev] Invalid sideband mode encountered
Jean-Marc Valin
jean-marc.valin at usherbrooke.ca
Thu Jul 20 00:34:57 PDT 2006
Please port these to the jspeex mailing list.
Jean-Marc
On Thu, 2006-07-20 at 00:09 -0700, Thabang Kevin Khanye wrote:
> 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.
> _______________________________________________
> Speex-dev mailing list
> Speex-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/speex-dev
More information about the Speex-dev
mailing list