Changeset 27


Ignore:
Timestamp:
Oct 10, 2011, 5:44:58 AM (10 years ago)
Author:
roman
Message:

fix for syntax and zero dBFS /l:0 parameter

Location:
trunk/Utilities/GeneratePcmWavFile
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Utilities/GeneratePcmWavFile/GeneratePcmWavFile.cpp

    r10 r27  
    443443                        _tprintf(_T("  /l:N: Sine Signal Loudness N, dB below full scale\n"));
    444444                        _tprintf(_T("  /n:N: Noise Signal Loudness N, dB below full scale\n"));
    445                         __C(S_FALSE);
     445                        AtlThrow(S_FALSE);
    446446                }
    447447                #pragma endregion
     
    458458                CObjectPtr<CSourceFilter> pSourceFilter;
    459459                pSourceFilter.Construct()->Initialize(pWaveFormatEx, m_nLength);
    460                 if(m_nSignalFrequency && m_nSignalLoudness || m_nNoiseLoudness)
     460                if(m_nSignalFrequency && m_nSignalLoudness >= 0 || m_nNoiseLoudness)
    461461                {
    462462                        __D(m_WaveFormatEx.wBitsPerSample == 16, E_NOTIMPL);
    463463                        DOUBLE fSignalPeriod = 0, fSignalAmplitude = 0;
    464                         if(m_nSignalFrequency && m_nSignalLoudness)
     464                        if(m_nSignalFrequency && m_nSignalLoudness >= 0)
    465465                        {
    466466                                fSignalPeriod = (DOUBLE) pWaveFormatEx->nSamplesPerSec / m_nSignalFrequency;
Note: See TracChangeset for help on using the changeset viewer.