mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-16 00:34:19 +00:00
Added method AudioProcessor::silenceInProducesSilenceOut().
This commit is contained in:
parent
f07139f748
commit
eda5904ba7
5 changed files with 33 additions and 4 deletions
|
|
@ -367,6 +367,19 @@ public:
|
|||
|
||||
void* getPlatformSpecificData() { return audioUnit; }
|
||||
const String getName() const { return pluginName; }
|
||||
|
||||
bool silenceInProducesSilenceOut() const
|
||||
{
|
||||
Float64 tail = 0;
|
||||
UInt32 tailSize = sizeof (tail);
|
||||
|
||||
if (audioUnit != 0)
|
||||
AudioUnitGetProperty (audioUnit, kAudioUnitProperty_TailTime, kAudioUnitScope_Global,
|
||||
0, &tail, &tailSize);
|
||||
|
||||
return tail <= 0;
|
||||
}
|
||||
|
||||
bool acceptsMidi() const { return wantsMidiMessages; }
|
||||
bool producesMidi() const { return producesMidiMessages; }
|
||||
|
||||
|
|
|
|||
|
|
@ -871,8 +871,8 @@ public:
|
|||
setLatencySamples (effect->initialDelay);
|
||||
}
|
||||
|
||||
void* getPlatformSpecificData() { return effect; }
|
||||
const String getName() const { return name; }
|
||||
void* getPlatformSpecificData() { return effect; }
|
||||
const String getName() const { return name; }
|
||||
|
||||
int getUID() const
|
||||
{
|
||||
|
|
@ -884,8 +884,13 @@ public:
|
|||
return uid;
|
||||
}
|
||||
|
||||
bool acceptsMidi() const { return wantsMidiMessages; }
|
||||
bool producesMidi() const { return dispatch (effCanDo, 0, 0, (void*) "sendVstMidiEvent", 0) > 0; }
|
||||
bool silenceInProducesSilenceOut() const
|
||||
{
|
||||
return effect == nullptr || (effect->flags & effFlagsNoSoundInStop) != 0;
|
||||
}
|
||||
|
||||
bool acceptsMidi() const { return wantsMidiMessages; }
|
||||
bool producesMidi() const { return dispatch (effCanDo, 0, 0, (void*) "sendVstMidiEvent", 0) > 0; }
|
||||
|
||||
//==============================================================================
|
||||
void prepareToPlay (double rate, int samplesPerBlockExpected)
|
||||
|
|
|
|||
|
|
@ -239,6 +239,9 @@ public:
|
|||
*/
|
||||
void setLatencySamples (int newLatency);
|
||||
|
||||
/** Returns true if a silent input always produces a silent output (i.e. it has no tail). */
|
||||
virtual bool silenceInProducesSilenceOut() const = 0;
|
||||
|
||||
/** Returns true if the processor wants midi messages. */
|
||||
virtual bool acceptsMidi() const = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -1322,6 +1322,7 @@ const String AudioProcessorGraph::getOutputChannelName (int channelIndex) const
|
|||
|
||||
bool AudioProcessorGraph::isInputChannelStereoPair (int /*index*/) const { return true; }
|
||||
bool AudioProcessorGraph::isOutputChannelStereoPair (int /*index*/) const { return true; }
|
||||
bool AudioProcessorGraph::silenceInProducesSilenceOut() const { return false; }
|
||||
bool AudioProcessorGraph::acceptsMidi() const { return true; }
|
||||
bool AudioProcessorGraph::producesMidi() const { return true; }
|
||||
void AudioProcessorGraph::getStateInformation (juce::MemoryBlock& /*destData*/) {}
|
||||
|
|
@ -1423,6 +1424,11 @@ void AudioProcessorGraph::AudioGraphIOProcessor::processBlock (AudioSampleBuffer
|
|||
}
|
||||
}
|
||||
|
||||
bool AudioProcessorGraph::AudioGraphIOProcessor::silenceInProducesSilenceOut() const
|
||||
{
|
||||
return isOutput();
|
||||
}
|
||||
|
||||
bool AudioProcessorGraph::AudioGraphIOProcessor::acceptsMidi() const
|
||||
{
|
||||
return type == midiOutputNode;
|
||||
|
|
|
|||
|
|
@ -320,6 +320,7 @@ public:
|
|||
const String getOutputChannelName (int channelIndex) const;
|
||||
bool isInputChannelStereoPair (int index) const;
|
||||
bool isOutputChannelStereoPair (int index) const;
|
||||
bool silenceInProducesSilenceOut() const;
|
||||
bool acceptsMidi() const;
|
||||
bool producesMidi() const;
|
||||
|
||||
|
|
@ -364,6 +365,7 @@ public:
|
|||
const String getOutputChannelName (int channelIndex) const;
|
||||
bool isInputChannelStereoPair (int index) const;
|
||||
bool isOutputChannelStereoPair (int index) const;
|
||||
bool silenceInProducesSilenceOut() const;
|
||||
|
||||
bool acceptsMidi() const;
|
||||
bool producesMidi() const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue