diff --git a/modules/juce_audio_basics/synthesisers/juce_Synthesiser.h b/modules/juce_audio_basics/synthesisers/juce_Synthesiser.h index 7052b00276..f255fa3604 100644 --- a/modules/juce_audio_basics/synthesisers/juce_Synthesiser.h +++ b/modules/juce_audio_basics/synthesisers/juce_Synthesiser.h @@ -571,7 +571,6 @@ protected: int midiNoteNumber) const; /** Starts a specified voice playing a particular sound. - You'll probably never need to call this, it's used internally by noteOn(), but may be needed by subclasses for custom behaviours. */ @@ -581,6 +580,13 @@ protected: int midiNoteNumber, float velocity); + /** Stops a given voice. + You should never need to call this, it's used internally by noteOff, but is protected + in case it's useful for some custom subclasses. It basically just calls through to + SynthesiserVoice::stopNote(), and has some assertions to sanity-check a few things. + */ + void stopVoice (SynthesiserVoice*, float velocity, bool allowTailOff); + /** Can be overridden to do custom handling of incoming midi events. */ virtual void handleMidiEvent (const MidiMessage&); @@ -592,8 +598,6 @@ private: bool shouldStealNotes; BigInteger sustainPedalsDown; - void stopVoice (SynthesiserVoice*, float velocity, bool allowTailOff); - #if JUCE_CATCH_DEPRECATED_CODE_MISUSE // Note the new parameters for these methods. virtual int findFreeVoice (const bool) const { return 0; }