Search code examples
c#mp3naudio

Trouble with Mp3 Frames


I'm new to c# .net, I'm working on mp3.

I would like to get the actual data of one frame of an mp3 file, as there is first header, then side information of the frame.

I only need to get the actual bits with no header and ancillary info. Can I use NAudio to do this?

I have found an Mp3FileReader class and Mp3Frame class there, I have also found a RawData variable but don't know how to use them.


Solution

  • You can call Mp3FileReader.ReadNextFrame to get at each MP3 raw frame. NAudio's Mp3Frame class will tell you some information about the frame, such as sample rate, stereo mode etc.