Sample Rate in PluginProcessor 'processBlock' function

Hi, I was wondering if the AudioBuffer given in the processBlock function always has a sample rate of 44100 or something, or if that depends on the host.

Is there a way to get that sample rate?


I found you can use this

double sampleRate = this->getSampleRate();

You can override the prepareToPlay() function to find the sample rate. This function will be called before the playback starts. See the documentation here.