AudioParameter* classes with std::function and lambda


#1

 

I changed AudioParamFloat, AudioParamBool and AudioParamInt classes. I made private members protected and I added std::function member. 

https://github.com/volkoaudio/JUCEvk

It can be used by this example: 

 

In PluginProcessor.h

 

AudioParameterFloatVk *_paramFloat;

 

In PluginProcessor.cpp

 

auto lambdaParamFloat = 
    this { Logger::getCurrentLogger()->writeToLog(String("ParamFloat: ") + String(paramValue)); };

addParameter( _paramFloat = 
    new AudioParameterFloatVk( "paramfloat", "Parameter Float", -100.f, 100.f, 0.f, lambdaParamFloat ) 
);

Then when you call setValueNotifyingHost(), lambdaParamFloat will also call.