Get sampleRate of an AudioFormatReaderSource


#1

How can I get the SampleRate of an AudioFormatReaderSource?

to be clear what I’m trying achieve here, I have an AudioFormatReaderSource and I want to know if it is at the same sampleRate to the device, and if if not resample it with the ResamplingAudioSource.


#2
readersource->getAudioFormatReader()->sampleRate

Note sampleRate is a public member variable, not a method.