This pull request addresses the compiler errors that result from using the DSP_SAMPLE_FLOAT definition.
Some of the dsp modules explicitly use the double keyword on template parameters, function argument, return types etc.
This becomes a problem when the DSP_SAMPLE_FLOAT macro is defined as some compilers complain about not being able to convert floats to doubles (which makes sense in some cases since float variables and pointers are being passed to function calls that are expecting doubles).
More specifically these errors occur for:
The IpulseResponse class Process function expects and returns double pointers.
The mGainReductionDB vector declaration in line 127 of NoiseGate.h in the Trigger class, has a template parameter of double while the GetGainReduction() function in line 93 is returning a vector of type DSP_SAMPLE which would be float in the case of the DSP_SAMPLE_FLOAT definition.
I'm not sure if there was a specific reason for the ImpulseResponse class to be explicitly using double precision when the other classes including the base DSP are using the macro, but this change shouldn't be too invasive since everything is defaulting to double.
I hope it's ok that I didn't open an issue first, I didn't think it was needed since the changes are pretty small...
This pull request addresses the compiler errors that result from using the
DSP_SAMPLE_FLOAT
definition. Some of the dsp modules explicitly use thedouble
keyword on template parameters, function argument, return types etc.This becomes a problem when the
DSP_SAMPLE_FLOAT
macro is defined as some compilers complain about not being able to convert floats to doubles (which makes sense in some cases since float variables and pointers are being passed to function calls that are expecting doubles).More specifically these errors occur for:
The
IpulseResponse
classProcess
function expects and returns double pointers.The
mGainReductionDB
vector declaration in line 127 ofNoiseGate.h
in theTrigger
class, has a template parameter of double while theGetGainReduction()
function in line 93 is returning a vector of typeDSP_SAMPLE
which would be float in the case of the DSP_SAMPLE_FLOAT definition.I'm not sure if there was a specific reason for the ImpulseResponse class to be explicitly using double precision when the other classes including the base DSP are using the macro, but this change shouldn't be too invasive since everything is defaulting to double.
I hope it's ok that I didn't open an issue first, I didn't think it was needed since the changes are pretty small...