Changeset 325


Ignore:
Timestamp:
05/13/07 15:47:14 (17 years ago)
Author:
r2d
Message:

corrected end of file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libmpc/trunk/mpcenc/mpcenc.c

    r323 r325  
    17331733        memmove ( Main.S, Main.S + BLOCK, CENTER * sizeof(float) );
    17341734
     1735        // read samples
     1736        CurrentRead     = Read_WAV_Samples ( &Wave, (int)minf(BLOCK, SamplesInWAVE - AllSamplesRead), &Main, CENTER, ScalingFactorl, ScalingFactorr, &Silence );
     1737        AllSamplesRead += CurrentRead;
     1738
    17351739        // adapt SamplesInWAV to the real number of contained samples
    17361740                if ( myfeof (Wave.fp) ) {
    17371741                        stderr_printf ( "WAVE file has incorrect header: header: %.3f s, contents: %.3f s    \n",
    17381742                                                        (long double)(SamplesInWAVE) / m.SampleFreq, (long double)(AllSamplesRead) / m.SampleFreq);
    1739                         break;
     1743                        SamplesInWAVE = AllSamplesRead;
    17401744                }
    1741 
    1742         // read samples
    1743         CurrentRead     = Read_WAV_Samples ( &Wave, (int)minf(BLOCK, SamplesInWAVE - AllSamplesRead), &Main, CENTER, ScalingFactorl, ScalingFactorr, &Silence );
    1744         AllSamplesRead += CurrentRead;
    17451745    }
    17461746
     
    17601760        writeBlock(&e, "SE", MPC_FALSE, 0); // write end of stream block
    17611761
    1762         if (SamplesInWAVE != AllSamplesRead) {
    1763                 SamplesInWAVE = AllSamplesRead;
     1762        if (Wave.PCMSamples != AllSamplesRead) {
    17641763                fseek(e.outputFile, e.seek_ref + 4, SEEK_SET);
    17651764                writeStreamInfo ( &e, m.Max_Band, m.MS_Channelmode > 0, SamplesInWAVE, 0,
Note: See TracChangeset for help on using the changeset viewer.