我正在浏览 NAudio Source Demo 中的 Mp3StreamingDemo,我需要一个关于解压缩 Mp3 帧的解释(没有什么深入的,只是几句话,以获得一个大致的概念)。
实际代码是:
IMp3FrameDecompressor decompressor = null;
//...
if (decompressor == null)
{
WaveFormat waveFormat = new Mp3WaveFormat(frame.SampleRate, frame.ChannelMode == ChannelMode.Mono ? 1 : 2, frame.FrameLength, frame.BitRate);
//What does AcmMp3FrameDecompressor do?
decompressor = new AcmMp3FrameDecompressor(waveFormat);
this.bufferedWaveProvider = new BufferedWaveProvider(decompressor.OutputFormat);
}
int decompressed = decompressor.DecompressFrame(frame, buffer, 0);
我确实对MP3有一些了解,它看起来如何,关于帧等。我只是不明白mp3帧解压缩的过程?具体来说:
AcmMp3FrameDecompressor 类用于什么?DecompressFrame 方法有什么作用?
我可以从课堂上看到代码,但要深入理解它,我认为我需要更多关于音频本身的知识。目前,正如我所说,我希望只是一般性的描述。
感谢您的时间和帮助。