Dynamic notification for sample rate change in externals ?
Our external C++ object would need to react when the user change the sample rate in the audio setup. Is there a way to get notified when sample rate changes?
If the sample rate is changed you'll get a new dsp message. The sample rate is in each of the DSP vectors (second parameter to your dsp() method).
Do you mean a *single* samplerate notification is received in this case? Or do I need to check the samplerate value at each audio cycle?
The sample rate won't change in the middle of the perform method. When the sample rate changes the dsp message is sent to every objects (so you can cache that in your object structure, do some calculation... and defines what perform method you'd like to add).
Problem solved thanks.