SOUL/reverb.cpp: In instantiation of 'static void Reverb::copyFromInterleaved(DestFloatType* const*, uint32_t, const SourceFloatType*, uint32_t) [with SourceFloatType = Reverb::Vector<float, 2>; DestFloatType = float; uint32_t = long unsigned int]':
SOUL/reverb.cpp:175:33: required from 'void Reverb::render(Reverb::RenderContext<FloatType>) [with FloatType = float]'
main.cpp:81:20: required from here
SOUL/reverb.cpp:582:23: error: invalid static_cast from type 'const Reverb::Vector<float, 2>' to type 'float'
582 | dest[i] = static_cast<DestFloatType> (monoSource[i]);
This happens because the compiler picks the copyFromInterleaved for mono sources instead of the vector source one.
If I comment out the mono source one, I get this error:
SOUL/reverb.cpp:175:33: error: no matching function for call to 'Reverb::copyFromInterleaved(float**, uint32_t&, Reverb::FixedArray<Reverb::Vector<float, 2>, 1024>::ElementType [1024], long unsigned int&)'
175 | copyFromInterleaved (&context.outputChannels[0], startFrame, _getOutputFrameArrayRef_audioOut (state).elements, numFramesToDo);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SOUL/reverb.cpp:586:24: note: candidate: 'template<class SourceFloatType, class DestFloatType, int numChannels> static void Reverb::copyFromInterleaved(DestFloatType* const*, uint32_t, const Reverb::Vector<SourceFloatType, numChannels>*, uint32_t)'
586 | static inline void copyFromInterleaved (DestFloatType* const* destChannels, uint32_t destStartFrame, const Vector<SourceFloatType, numChannels>* vectorSource, uint32_t numFrames)
| ^~~~~~~~~~~~~~~~~~~
SOUL/reverb.cpp:586:24: note: template argument deduction/substitution failed:
SOUL/reverb.cpp:175:33: note: mismatched types 'int' and 'long int'
175 | copyFromInterleaved (&context.outputChannels[0], startFrame, _getOutputFrameArrayRef_audioOut (state).elements, numFramesToDo);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It is fixed by changing the copyFromInterleaved() template arguments to
Applies to:
When building generated code, I get the following errors:
Error 1
Is later implemented as
which throws an error with this compiler.
Error 2
This happens because the compiler picks the
copyFromInterleaved
for mono sources instead of the vector source one. If I comment out the mono source one, I get this error:It is fixed by changing the
copyFromInterleaved()
template arguments toWarning
(in
init()
) Solution: