Synthesiser::setCurrentPlaybackSampleRate should be virtual?

It is just a suggestion - should not be the Synthesiser::setCurrentPlaybackSampleRate virtual by default? Sometimes it would be handy to process some more specific stuff when sample rate changes. Yes I can do it in forked JUCE, but it is a proposal for original distribution. 

Please prove me wrong if I am missing something :)

Yep, I guess I could do that.

Cool, that would be awesome :)

I think to make it consistent it would be cool to have the sample rate function virtual in SynthesiserVoice as well... While I am thinking about that this could be usefull at least the same as to have virtual method in Synthesiser class. 

I already did that, didn't I?

Yes, Jules, you made Synthesiser class method virtual. Thank you! I mean it would be cool to make SynthesiserVoice virtual as well. What do you think?

To be accurate I mean this method: SynthesiserVoice::setCurrentPlaybackSampleRate(double newRate)

Huh? Like I said, I made that method virtual in SynthesiserVoice too. If that's not what you mean, you need to explain more clearly what you're trying to say.

Yes, you did it! Sorry, I just checked the commit log not the diff! angel  In commit log there is message "Made Synthesiser::setCurrentPlaybackSampleRate virtual." while the commit contains both changes - for Synthesiser and SynthesiserVioce. enlightened Thank you once again!

Hm... Does the Synthesiser class have any getCurrentSamplePlaybackRate() function? It would be handy to have it or at least if the sampleRate variable would be protected...

It's available to in the synthesiservoice class. That's generally where you need to do the processing, so seems like the best place for it, though I agree there's no reason why it couldn't also be added to the synthesiser class.

Yeah, the SynthesiserVoice solution came on my mind as well. But in case of having no voices allocated it would be needed (although it won't happen much I assume...)

But I didn't realize that SynthesiserVoice::getSampleRate() is protected. So there is no way to know at Synthesiser's child class its sample rate AFAIK. Or I am wrong?

I was just doing some other work on the synthesiser class so have refactored this - have a look now.

Yes, thank you very much, Jules!