From 1f71b5f4fb8351b179600aa51818fd48edfad036 Mon Sep 17 00:00:00 2001 From: reuk Date: Thu, 17 Oct 2024 18:36:06 +0100 Subject: [PATCH] AudioProcessor: Update documentation to make implementation requirements clearer for MIDI-related member functions --- .../processors/juce_AudioProcessor.h | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.h b/modules/juce_audio_processors/processors/juce_AudioProcessor.h index 9dbaa78e61..74376b5096 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessor.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.h @@ -852,16 +852,36 @@ public: /** Returns the length of the processor's tail, in seconds. */ virtual double getTailLengthSeconds() const = 0; - /** Returns true if the processor wants MIDI messages. */ + /** Returns true if the processor wants MIDI messages. + + This must return the same value every time it is called. + This may be called by the audio thread, so this should be fast. + Ideally, just return a constant. + */ virtual bool acceptsMidi() const = 0; - /** Returns true if the processor produces MIDI messages. */ + /** Returns true if the processor produces MIDI messages. + + This must return the same value every time it is called. + This may be called by the audio thread, so this should be fast. + Ideally, just return a constant. + */ virtual bool producesMidi() const = 0; - /** Returns true if the processor supports MPE. */ + /** Returns true if the processor supports MPE. + + This must return the same value every time it is called. + This may be called by the audio thread, so this should be fast. + Ideally, just return a constant. + */ virtual bool supportsMPE() const { return false; } - /** Returns true if this is a MIDI effect plug-in and does no audio processing. */ + /** Returns true if this is a MIDI effect plug-in and does no audio processing. + + This must return the same value every time it is called. + This may be called by the audio thread, so this should be fast. + Ideally, just return a constant. + */ virtual bool isMidiEffect() const { return false; } //==============================================================================