Changeset 10 for trunk/Utilities/GeneratePcmWavFile
- Timestamp:
- Aug 28, 2011, 6:08:55 AM (12 years ago)
- Location:
- trunk/Utilities/GeneratePcmWavFile
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Utilities/GeneratePcmWavFile/GeneratePcmWavFile.cpp
r9 r10 236 236 if(m_fSignalPeriod > 0) 237 237 { 238 for(SIZE_T nIndex = 0; nIndex < nDataSize; nIndex += pWaveFormatEx->nBlockAlign) 238 SIZE_T nSampleIndex = 0; 239 for(SIZE_T nIndex = 0; nIndex < nDataSize; nIndex += pWaveFormatEx->nBlockAlign, nSampleIndex++) 239 240 { 240 const SHORT nValue = (SHORT) (m_fSignalAmplitude * sin(2 * M_PI * (ThreadContext.m_nCurrentSampleIndex + n Index) / m_fSignalPeriod));241 const SHORT nValue = (SHORT) (m_fSignalAmplitude * sin(2 * M_PI * (ThreadContext.m_nCurrentSampleIndex + nSampleIndex) / m_fSignalPeriod)); 241 242 SHORT* pnSampleData = (SHORT*) (Properties.pbBuffer + nIndex); 242 243 for(WORD nChannelIndex = 0; nChannelIndex < pWaveFormatEx->nChannels; nChannelIndex++)
Note: See TracChangeset
for help on using the changeset viewer.