Exemplo n.º 1
0
//---------------------------------------------------------------------------
void File_Lyrics3v2::Header_Parse()
{
    if (TotalSize<=15) //First 10 is minimum size of a tag, Second 10 is ID3v2 header size
    {
        //Place for footer
        Header_Fill_Code((int64u)-1, "File Footer");
        Header_Fill_Size(TotalSize);
        return;
    }

    //Parsing
    Ztring SizeT;
    int64u Size;
    int32u Field;
    Get_C3 (Field,                                           "Field");
    Get_Local(5, SizeT,                                      "Size");
    Size=8+SizeT.To_int64u();

    //Filling
    if (Size+15>TotalSize)
        Size=TotalSize-15;
    Header_Fill_Code(Field, Ztring().From_CC3(Field));
    Header_Fill_Size(Size);
    TotalSize-=Size;
}
Exemplo n.º 2
0
//---------------------------------------------------------------------------
void File_Lyrics3v2::Header_Parse()
{
    if (Buffer_Offset+15>=Buffer_Size) //first 10 is minimum size of a tag, Second 10 is ID3v2 header size
    {
        //Place for footer
        Header_Fill_Code(0xFFFFFFFF, "Footer");
        Header_Fill_Size(Buffer_Size-Buffer_Offset);
        return;
    }

    //Parsing
    Ztring Size;
    int32u Field;
    Get_C3 (Field,                                           "Field");
    Get_Local(5, Size,                                       "Size");

    //Filling
    Header_Fill_Code(Field, Ztring().From_CC3(Field));
    Header_Fill_Size(8+Size.To_int64u());
}