i just noticed addWithMultiply has an overload for
float*, float* const*, float* const*, int
but copyWithMultiply only has
float*, float* const*, float, int
it would be cool if copying from a src to a dest could also be done while multiplying the src with a buffer of gain values instead of a single gain value
isn’t that what multiply (FloatType *dest, const FloatType *src1, const FloatType *src2, CountType numValues)
does?
that is what i looked for yesterday, yes. i’ll check again today if it suddenly appeared. maybe visual studio was just weird
ok i checked again. there is still no such overload for copyWithMultiply. it also can’t be found in the docs
yes because there’s already the multiply
overload which gives you exactly that functionality (if I am not mistaken)
i can be a little confused sometimes, but if i overlooked something here i’d have to be seriously concerned. i really can’t find an overload where the gain values are a buffer. only ones where there is exactly one gain value applied to a src buffer, then copied into the dest buffer
I just looked up the docs (JUCE: FloatVectorOperationsBase< FloatType, CountType > Struct Template Reference) and saw that method. I haven’t actually checked it in my IDE. But I am pretty sure in one of my projects I am using that multiply method to multiply two buffers and write the result into a third one
Link to the exact method
https://docs.juce.com/master/structFloatVectorOperationsBase.html#ad65da3c5ba7d40adf4eec01a9166af90
oh i see. it is just not called copyAndMultiply. thanks for showing me this method. i’d still suggest to the juce team to add a copyAndMultiply method that just wraps that multiply-method, to make it appear more consistent with what addAndMultiply does