micknoise / Maximilian

C++ Audio and Music DSP Library

Home Page:http://www.maximilian.strangeloop.co.uk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Changes made to build properly in VS2019 with JUCE static_cast in maximilian.cpp and change to return in maxiConvolve.cpp function float maxiConvolve::play(float w)

mihailoradosavljevic opened this issue · comments

in maximilian.cpp line 1071
added static cast:

int fadeSize=min((unsigned long)100, static_cast(amplitudes.size()));

in maxiConvolve.cpp line 109:
//return ifft.process(&sumReal.front(), &sumImag.front(), maxiIFFT::COMPLEX);
return ifft.process(sumReal, sumImag, maxiIFFT::COMPLEX);

After those changes build was success, and everything works as expected.

thanks we'll incorporate these fixes

Hello!

Suggested fix at line 1071 in maximilian.cpp didn't work for me. I believe the reason to be lack of a type to cast to. The line below works in my case:

int fadeSize=min((unsigned long)100, static_cast<unsigned long>(amplitudes.size()));

Proposed solution by @saha-dizel appears to work on Windows 10 x64 machine, Visual Studio 2019 + Juce Framework.

However, not sure static_cast is required as amplitudes is not a pointer. The following works well on my environment stated above. The code, though, does beg the question why the min comparison between 2 type longs is being stored in type int.

int fadeSize = min((unsigned long)100, (unsigned long)amplitudes.size());