1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-17 00:44:19 +00:00
JUCE/modules/juce_audio_processors/utilities/juce_VST3ClientExtensions.h
reuk 8f29b2cb83
VST3: Allow plugins to designate the first input bus as Aux rather than Main
To use this feature, derive your AudioProcessor from
VST3ClientExtensions and override getPluginHasMainInput() to return
false. The main input bus will then be designated as an Aux bus, rather
than a Main bus.

This is mainly useful for synth plugins like vocoders, which may need a
sidechain audio input, but which should replace all audio on the channel
with the output of the synth, rather than mixing with the audio input.
2021-07-27 15:10:53 +01:00

95 lines
3.1 KiB
C++

/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2020 - Raw Material Software Limited
JUCE is an open source library subject to commercial or open-source
licensing.
By using JUCE, you agree to the terms of both the JUCE 6 End-User License
Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020).
End User License Agreement: www.juce.com/juce-6-licence
Privacy Policy: www.juce.com/juce-privacy-policy
Or: You may also use this code under the terms of the GPL v3 (see
www.gnu.org/licenses).
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
DISCLAIMED.
==============================================================================
*/
// Forward declaration to avoid leaking implementation details.
namespace Steinberg
{
class FUnknown;
using TUID = char[16];
}
namespace juce
{
/** An interface to allow an AudioProcessor to implement extended VST3-specific
functionality.
To use this class, ensure that your AudioProcessor publicly inherits
from VST3ClientExtensions.
@see VSTCallbackHandler
@tags{Audio}
*/
struct VST3ClientExtensions
{
virtual ~VST3ClientExtensions() = default;
/** This function may be used by implementations of queryInterface()
in the VST3's implementation of IEditController to return
additional supported interfaces.
*/
virtual int32_t queryIEditController (const Steinberg::TUID, void** obj)
{
*obj = nullptr;
return -1;
}
/** This function may be used by implementations of queryInterface()
in the VST3's implementation of IAudioProcessor to return
additional supported interfaces.
*/
virtual int32_t queryIAudioProcessor (const Steinberg::TUID, void** obj)
{
*obj = nullptr;
return -1;
}
/** This may be called by the VST3 wrapper when the host sets an
IComponentHandler for the plugin to use.
You should not make any assumptions about how and when this will be
called - this function may not be called at all!
*/
virtual void setIComponentHandler (Steinberg::FUnknown*) {}
/** This may be called shortly after the AudioProcessor is constructed
with the current IHostApplication.
You should not make any assumptions about how and when this will be
called - this function may not be called at all!
*/
virtual void setIHostApplication (Steinberg::FUnknown*) {}
/** This function will be called to check whether the first input bus
should be designated as "kMain" or "kAux". Return true if the
first bus should be kMain, or false if the bus should be kAux.
All other input buses will always be designated kAux.
*/
virtual bool getPluginHasMainInput() const { return true; }
};
} // namespace juce