简体   繁体   English

Mp3帧用NAudio解压缩

[英]Mp3 frame decompress with NAudio

I am going through Mp3StreamingDemo from NAudio Source Demo, and I need an explanation (nothing in depth, just a few sentences, to get a general idea) about decompressing the Mp3 frame. 我正在通过NAudio Source Demo进行Mp3StreamingDemo,我需要一个关于解压缩Mp3帧的解释(没有深入,只有几句话,以获得一般概念)。

The actual code is: 实际代码是:

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);

I do have some knowledge about MP3, how does it look, about frames, etc. I just don't understand the process of mp3 frame decompression? 我对MP3有一些了解,它看起来如何,关于帧等等。我只是不明白mp3帧解压缩的过程? Specifically: 特别:

what for is AcmMp3FrameDecompressor class used? 什么是AcmMp3FrameDecompressor类使用? What does DecompressFrame method do? DecompressFrame方法有什么作用?

I can see the code from the class, but to understand it in depth I think I'll need much more knowledge about audio itself. 我可以看到课堂上的代码,但要深入了解它,我想我需要更多关于音频本身的知识。 And at the moment, as I said, I would appreciate just a description in general. 就目前而言,正如我所说的,我只会欣赏一般的描述。

Thank you for your time and help. 感谢您的时间和帮助。

AcmMp3FrameDecompressor decompresses an MP3 frame to PCM using the ACM codec on your computer. AcmMp3FrameDecompressor使用计算机上的ACM编解码器将MP3帧解压缩到PCM。 All desktop versions of Windows since Windows XP come with one, but there are some cases you might encounter where one is unavailable. 自Windows XP以来,Windows的所有桌面版本都附带一个,但在某些情况下,您可能会遇到一个不可用的情况。 NAudio also supplies a DMO based MP3 frame decoder, which can be used on Windows Vista and newer. NAudio还提供基于DMO的MP3帧解码器,可在Windows Vista及更高版本上使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM