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/mpcenc/mpcenc.c

    r213 r220  
    16111611        writeMagic(&e);
    16121612        writeStreamInfo ( &e, m.Max_Band, m.MS_Channelmode > 0, SamplesInWAVE,
    1613                                            m.SampleFreq, Wave.Channels > 2 ? 2 : Wave.Channels, 0, 0, 0, 0);
    1614         si_size = writeBlock(&e, "SI", MPC_TRUE, 0);
    1615         writeEncoderInfo(&e, m.FullQual, m.PNS > 0, MPPENC_MAJOR, MPPENC_MINOR,
    1616                                           MPPENC_IMPLEMENT, MPPENC_BUILD);
     1613                                           m.SampleFreq, Wave.Channels > 2 ? 2 : Wave.Channels);
     1614        si_size = writeBlock(&e, "SH", MPC_TRUE, 0);
     1615        writeGainInfo ( &e, 0, 0, 0, 0);
     1616        writeBlock(&e, "RG", MPC_FALSE, 0);
     1617        writeEncoderInfo(&e, m.FullQual, m.PNS > 0, MPCENC_MAJOR, MPCENC_MINOR,
     1618                                          MPCENC_BUILD);
    16171619        writeBlock(&e, "EI", MPC_FALSE, 0);
    16181620        e.seek_ptr = ftell(e.outputFile);
    16191621        writeBits (&e, 0, 8);
    16201622        writeBits (&e, 0, 32); // jump 40 bits for seek table pointer
    1621         writeBlock(&e, "SP", MPC_FALSE, 0); // reserve space for seek pointer
     1623        writeBlock(&e, "SO", MPC_FALSE, 0); // reserve space for seek offset
    16221624
    16231625
     
    17241726                }
    17251727                e.block_cnt++;
    1726                 writeBlock(&e, "AD", MPC_FALSE, 0);
     1728                writeBlock(&e, "AP", MPC_FALSE, 0);
    17271729        }
    17281730        writeSeekTable(&e);
     
    17341736                fseek(e.outputFile, e.seek_ref + 4, SEEK_SET);
    17351737                writeStreamInfo ( &e, m.Max_Band, m.MS_Channelmode > 0, SamplesInWAVE,
    1736                                                    m.SampleFreq, Wave.Channels > 2 ? 2 : Wave.Channels, 0, 0, 0, 0);
    1737                 writeBlock(&e, "SI", MPC_TRUE, si_size);
     1738                                                   m.SampleFreq, Wave.Channels > 2 ? 2 : Wave.Channels);
     1739                writeBlock(&e, "SH", MPC_TRUE, si_size);
    17381740                fseek(e.outputFile, 0, SEEK_END);
    17391741        }
Note: See TracChangeset for help on using the changeset viewer.