MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / calcFFT

Method calcFFT

extlibs/soloud/src/core/soloud.cpp:656–680  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

654
655
656 float * Soloud::calcFFT()
657 {
658 lockAudioMutex();
659 float temp[1024];
660 int i;
661 for (i = 0; i < 256; i++)
662 {
663 temp[i*2] = mVisualizationWaveData[i];
664 temp[i*2+1] = 0;
665 temp[i+512] = 0;
666 temp[i+768] = 0;
667 }
668 unlockAudioMutex();
669
670 SoLoud::FFT::fft1024(temp);
671
672 for (i = 0; i < 256; i++)
673 {
674 float real = temp[i * 2];
675 float imag = temp[i * 2 + 1];
676 mFFTData[i] = (float)sqrt(real*real+imag*imag);
677 }
678
679 return mFFTData;
680 }
681
682#ifdef SOLOUD_SSE_INTRINSICS
683 void Soloud::clip(AlignedFloatBuffer &aBuffer, AlignedFloatBuffer &aDestBuffer, unsigned int aSamples, float aVolume0, float aVolume1)

Callers

nothing calls this directly

Calls 1

fft1024Function · 0.85

Tested by

no test coverage detected