Ignore:
Timestamp:
11/11/06 18:19:44 (17 years ago)
Author:
r2d
Message:
  • added "EI" and "RG" blocks in output
  • updated "SI" block according to the spec
  • added "SE" block at the end of the stream
File:
1 edited

Legend:

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

    r78 r116  
    5959Bool_t        FrontendPresent = 0;      // Flag for frontend-detection
    6060Bool_t        XLevel          = 1;      // Encode extreme levels with relative SCFs
    61 const char    About []        = "MPC Encoder  " MPPENC_VERSION "  " MPPENC_BUILD "   (C) 1999-2005 Buschmann/Klemm/Piecha/MDT";
     61
     62#if MPPENC_MINOR % 2 == 0
     63#define _cat(a,b,c,d) #a"."#b"."#c"."#d" --stable--"
     64#else
     65#define _cat(a,b,c,d) #a"."#b"."#c"."#d" --unstable--"
     66#endif
     67
     68#define cat(a,b,c,d) _cat(a,b,c,d)
     69#define MPPENC_VERSION cat(MPPENC_MAJOR,MPPENC_MINOR,MPPENC_IMPLEMENT,MPPENC_BUILD)
     70
     71const char    About []        = "MPC Encoder " MPPENC_VERSION " (C) 1999-2005 Buschmann/Klemm/Piecha/MDT";
    6272
    6373
     
    16231633//     e.BufferedBits     = 0;
    16241634        writeMagic(&e);
    1625         WriteHeader_SV8 ( &e, m.Max_Band, m.MS_Channelmode > 0, SamplesInWAVE,
    1626                                            0x08, m.PNS > 0, m.SampleFreq,
    1627                                            Wave.Channels > 2 ? 2 : Wave.Channels);
     1635        writeStreamInfo ( &e, m.Max_Band, m.MS_Channelmode > 0, SamplesInWAVE,
     1636                                           m.SampleFreq, Wave.Channels > 2 ? 2 : Wave.Channels);
    16281637        writeBlock(&e, "SI", TRUE);
    1629 
     1638        writeGainInfo(&e);
     1639        writeBlock(&e, "RG", FALSE);
     1640        writeEncoderInfo(&e, m.MainQual, m.PNS > 0, MPPENC_MAJOR, MPPENC_MINOR,
     1641                                          MPPENC_IMPLEMENT, MPPENC_BUILD);
     1642        writeBlock(&e, "EI", FALSE);
    16301643
    16311644    // initialize timer
     
    17311744    // write the last incomplete block
    17321745        writeBlock(&e, "AD", FALSE);
     1746        writeBlock(&e, "SE", FALSE); // write end of stream block
    17331747    ShowProgress (&m, SamplesInWAVE, SamplesInWAVE, e.outputBits );
    17341748
     
    17691783        FrontendPresent = SearchForFrontend (); // search for presence of Windows Frontend
    17701784        if ( FrontendPresent )
    1771             SendStartupMessage ( MPPENC_VERSION, 7, MPPENC_BUILD );
     1785            SendStartupMessage ( MPPENC_VERSION, 8);
    17721786    }
    17731787
Note: See TracChangeset for help on using the changeset viewer.