Silverlight encoding/decoding problem


I am currently facing problems with decoding data, which received other network.
sampleIndex i get from encoding function.
      short[] decodedFrame = new short[sampleIndex]; 
      SpxDecoder.Decode(encodedData, 0, encodedData.Length, decodedFrame, 0, false);
Getting Error "IndexOutOfRangeException".


mikixd wrote May 29, 2011 at 3:07 PM

I have the same problem.

I've looked at the code and saw that the class Bits has a buffer fixed of 1024, if encodedData.Length is bigger this exception occurs, but if you try to:

for (int c = 0; c<encodedData.Length; c + = 1024)
 SpxDecoder.Decode (encodedData, c, c +1024> encodedData.Length? encodedData.Length-c: 1024, decodedFrame, 0, false);

The first iteration works but the second fails saying "Invalid sideband mode encountered"

How to solve this?

wrote Jun 27, 2011 at 4:43 PM

wrote Feb 14, 2013 at 7:12 PM