Ignore:
Timestamp:
02/17/07 18:49:10 (17 years ago)
Author:
r2d
Message:
  • updated according to the spec
  • now reads / write beginning / end silences, but decoder does not care.
  • please test !
File:
1 edited

Legend:

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

    r212 r220  
    123123        writeMagic(&e);
    124124        writeStreamInfo( &e, si.max_band, si.ms > 0, si.samples, si.sample_freq,
    125                                           si.channels, si.gain_title, si.gain_album, si.peak_title,
    126                                           si.peak_album);
    127         si_size = writeBlock(&e, "SI", MPC_TRUE, 0);
     125                                          si.channels);
     126        si_size = writeBlock(&e, "SH", MPC_TRUE, 0);
     127        writeGainInfo(&e, si.gain_title, si.gain_album, si.peak_title, si.peak_album);
     128        si_size = writeBlock(&e, "RG", MPC_FALSE, 0);
    128129        writeEncoderInfo(&e, si.profile, si.pns, si.encoder_version / 100,
    129                                           si.encoder_version % 100, 0, 0);
     130                                          si.encoder_version % 100, 0);
    130131        writeBlock(&e, "EI", MPC_FALSE, 0);
    131132        e.seek_ptr = ftell(e.outputFile);
    132133        writeBits (&e, 0, 8);
    133134        writeBits (&e, 0, 32); // jump 40 bits for seek table pointer
    134         writeBlock(&e, "SP", MPC_FALSE, 0); // reserve space for seek pointer
     135        writeBlock(&e, "SO", MPC_FALSE, 0); // reserve space for seek offset
    135136        while(MPC_TRUE)
    136137        {
     
    152153                }
    153154                e.block_cnt++;
    154                 writeBlock(&e, "AD", MPC_FALSE, 0);
     155                writeBlock(&e, "AP", MPC_FALSE, 0);
    155156        }
    156157        writeSeekTable(&e);
     
    160161                fseek(e.outputFile, e.seek_ref + 4, SEEK_SET);
    161162                writeStreamInfo( &e, si.max_band, si.ms > 0, demux->d->samples,
    162                                                   si.sample_freq, si.channels, si.gain_title,
    163                                                   si.gain_album, si.peak_title, si.peak_album);
    164                 writeBlock(&e, "SI", MPC_TRUE, si_size);
     163                                                  si.sample_freq, si.channels);
     164                writeBlock(&e, "SH", MPC_TRUE, si_size);
    165165                fseek(e.outputFile, 0, SEEK_END);
    166166        }
Note: See TracChangeset for help on using the changeset viewer.