使用NSpeex解码时遇到“无效模式:9”

时间:2015-05-29 16:48:52

标签: c# .net naudio decoding nspeex

这是我的代码:

public byte[] Decode(byte[] encodedData)
{
    short[] decodedFrame = new short[160]; // should be the same number of samples as on the capturing side
    int decoderBytes = decoder.Decode(encodedData, 0, encodedData.Length, decodedFrame, 0, false);
}

当我称这种方法时:

byte[] decodedBuffer = this.Decode(File.ReadAllBytes(@"C:\Users\Admin\Desktop\123.ogg"));

我收到“遇到无效模式:9 ”错误。

如何解决?我做错了什么?

1 个答案:

答案 0 :(得分:0)

你可以试试 https://sites.google.com/site/cobnut3d/

有C#

的例子