comparison tests/TestResampler.cpp @ 174:fc05ce770413

Comment fix
author Chris Cannam
date Mon, 12 May 2014 17:56:48 +0100
parents 6a820c2a3eb2
children
comparison
equal deleted inserted replaced
173:6a820c2a3eb2 174:fc05ce770413
181 testSinFrequency(int freq, 181 testSinFrequency(int freq,
182 int sourceRate, 182 int sourceRate,
183 int targetRate) 183 int targetRate)
184 { 184 {
185 // Resampling a sinusoid and then resampling back should give us a 185 // Resampling a sinusoid and then resampling back should give us a
186 // sinusoid of the same frequency as we started with. Let's start 186 // sinusoid of the same frequency as we started with
187 // with a few thousand cycles of it
188 187
189 int nCycles = 500; 188 int nCycles = 500;
190 189
191 int duration = int(nCycles * float(sourceRate) / float(freq)); 190 int duration = int(nCycles * float(sourceRate) / float(freq));
192 // cout << "freq = " << freq << ", sourceRate = " << sourceRate << ", targetRate = " << targetRate << ", duration = " << duration << endl; 191 // cout << "freq = " << freq << ", sourceRate = " << sourceRate << ", targetRate = " << targetRate << ", duration = " << duration << endl;