NSpeex on WP7 WriteSpeexHeader error

Dec 26, 2011 at 4:54 PM

Here is a screen shot of a watch window when debugging an assemble NSpeex.Silverlight on Windows Phone Mango:


As you can see, the writing position in a stream should be 32, but it is already 49. This results in the fact, that the 80 byte array is unable to fit the SpeexHeader, and the MemoryStream is not expandable exception is thrown. I am not sure why this happens on Windows Phone. Do you have any idea? 

Dec 26, 2011 at 5:02 PM

Explicitly changing the source code to System.Text.Encoding.UTF8.GetBytes fixes the problem. Don't know why UTF8 isn't the unicode in Windows Phone. The UTF16 is by default. 

Dec 26, 2011 at 6:36 PM

Hi maxpavlov,

thanks for pointing that out! Please feal free to upload a patch which I will merge as soon as I find some time.