MCPcopy Create free account
hub / github.com/LabSound/LabSound / print

Method print

src/internal/src/FFTFrame.cpp:233–257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231
232#ifndef NDEBUG
233void FFTFrame::print()
234{
235 FFTFrame & frame = *this;
236 float * realP = frame.realData();
237 float * imagP = frame.imagData();
238 printf("**** \n");
239 printf("DC = %f : nyquist = %f\n", realP[0], imagP[0]);
240
241 int n = m_FFTSize / 2;
242
243 for (int i = 1; i < n; i += 16)
244 {
245 printf("[%d] ", i);
246 for (int j = 0; j < 16; ++j)
247 {
248 double mag = sqrt(realP[i] * realP[i] + imagP[i] * imagP[i]);
249 double phase = atan2(realP[i], imagP[i]);
250 printf("(%f, %f), ", mag, phase);
251 if (i + j > n)
252 break;
253 }
254 printf("\n");
255 }
256 printf("****\n");
257}
258#endif // NDEBUG
259
260} // namespace lab

Callers

nothing calls this directly

Calls 2

realDataMethod · 0.45
imagDataMethod · 0.45

Tested by

no test coverage detected