Click here to Skip to main content
15,949,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My Problem is to get ACTUAL DATA of a mp3 frame. For this I have used NAudio and get RawData but I think in the RawData property, it returns all the bytes of the frame including header and side information.

Code is given below:
C#
private void button1_Click(object sender, EventArgs e)
{
    Mp3FileReader reader = new Mp3FileReader("file.mp3");
    Mp3Frame mp3Frame = reader.ReadNextFrame();
    byte [] FrameByteArray =  mp3Frame.RawData;

    BitArray bits = new BitArray(FrameByteArray);
    Console.Write(mp3Frame.RawData.Length);
    foreach (bool b in bits)
    {
        if (b == true)
        {
            Console.Write(" 1");
        }
        else
        {
            Console.Write(" 0");
        }
    }
    reader.Close();
}

it returns all frame data in bits including header and side information. But I only need actual data of every frame without header and side information.

Can anyone help??
Posted
Updated 17-Sep-13 22:03pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900