Ignore:
Timestamp:
11/20/06 19:53:36 (18 years ago)
Author:
r2d
Message:
  • added a first version of the seek table for sv8
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libmpc/branches/r2d/mppenc/mppenc.c

    r137 r147  
    16311631
    16321632        e.MS_Channelmode = m.MS_Channelmode;
    1633 //     e.BufferedBits     = 0;
    16341633        writeMagic(&e);
    16351634        writeStreamInfo ( &e, m.Max_Band, m.MS_Channelmode > 0, SamplesInWAVE,
     
    16411640                                          MPPENC_IMPLEMENT, MPPENC_BUILD);
    16421641        writeBlock(&e, "EI", FALSE);
     1642        e.seek_ref = ftell(e.outputFile);
     1643        writeBits (&e, 0, 32); // jump 32 bits for seek table pointer
     1644        writeBlock(&e, "ST", FALSE); // reserve space for pointer
     1645
    16431646
    16441647    // initialize timer
     
    17221725        }
    17231726
    1724         // for backwards-compatibility with older decoders write the 11 bit for
    1725         // reconstruction of exact filelength before the very last frame
    1726 
    17271727        memmove ( Main.L, Main.L + BLOCK, CENTER * sizeof(float) );
    17281728        memmove ( Main.R, Main.R + BLOCK, CENTER * sizeof(float) );
     
    17431743
    17441744    // write the last incomplete block
     1745        e.seek_table[e.seek_pos] = ftell(e.outputFile);
     1746        e.seek_pos++;
    17451747        writeBlock(&e, "AD", FALSE);
     1748        writeSeekTable(&e);
     1749        writeBlock(&e, "ST", FALSE); // write seek table block
    17461750        writeBlock(&e, "SE", FALSE); // write end of stream block
    17471751    ShowProgress (&m, SamplesInWAVE, SamplesInWAVE, e.outputBits );
Note: See TracChangeset for help on using the changeset viewer.