Changeset 325
- Timestamp:
- 05/13/07 15:47:14 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libmpc/trunk/mpcenc/mpcenc.c
r323 r325 1733 1733 memmove ( Main.S, Main.S + BLOCK, CENTER * sizeof(float) ); 1734 1734 1735 // read samples 1736 CurrentRead = Read_WAV_Samples ( &Wave, (int)minf(BLOCK, SamplesInWAVE - AllSamplesRead), &Main, CENTER, ScalingFactorl, ScalingFactorr, &Silence ); 1737 AllSamplesRead += CurrentRead; 1738 1735 1739 // adapt SamplesInWAV to the real number of contained samples 1736 1740 if ( myfeof (Wave.fp) ) { 1737 1741 stderr_printf ( "WAVE file has incorrect header: header: %.3f s, contents: %.3f s \n", 1738 1742 (long double)(SamplesInWAVE) / m.SampleFreq, (long double)(AllSamplesRead) / m.SampleFreq); 1739 break;1743 SamplesInWAVE = AllSamplesRead; 1740 1744 } 1741 1742 // read samples1743 CurrentRead = Read_WAV_Samples ( &Wave, (int)minf(BLOCK, SamplesInWAVE - AllSamplesRead), &Main, CENTER, ScalingFactorl, ScalingFactorr, &Silence );1744 AllSamplesRead += CurrentRead;1745 1745 } 1746 1746 … … 1760 1760 writeBlock(&e, "SE", MPC_FALSE, 0); // write end of stream block 1761 1761 1762 if (SamplesInWAVE != AllSamplesRead) { 1763 SamplesInWAVE = AllSamplesRead; 1762 if (Wave.PCMSamples != AllSamplesRead) { 1764 1763 fseek(e.outputFile, e.seek_ref + 4, SEEK_SET); 1765 1764 writeStreamInfo ( &e, m.Max_Band, m.MS_Channelmode > 0, SamplesInWAVE, 0,
Note: See TracChangeset
for help on using the changeset viewer.