|
|
|
@@ -42,7 +42,8 @@ namespace juce |
|
|
|
@tags{Audio}
|
|
|
|
*/
|
|
|
|
class StandalonePluginHolder : private AudioIODeviceCallback,
|
|
|
|
private Timer
|
|
|
|
private Timer,
|
|
|
|
private Value::Listener
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
//==============================================================================
|
|
|
|
@@ -78,9 +79,11 @@ public: |
|
|
|
|
|
|
|
: settings (settingsToUse, takeOwnershipOfSettings),
|
|
|
|
channelConfiguration (channels),
|
|
|
|
shouldMuteInput (! isInterAppAudioConnected()),
|
|
|
|
autoOpenMidiDevices (shouldAutoOpenMidiDevices)
|
|
|
|
{
|
|
|
|
shouldMuteInput.addListener (this);
|
|
|
|
shouldMuteInput = ! isInterAppAudioConnected();
|
|
|
|
|
|
|
|
createPlugin();
|
|
|
|
|
|
|
|
auto inChannels = (channelConfiguration.size() > 0 ? channelConfiguration[0].numIns
|
|
|
|
@@ -158,6 +161,7 @@ public: |
|
|
|
//==============================================================================
|
|
|
|
Value& getMuteInputValue() { return shouldMuteInput; }
|
|
|
|
bool getProcessorHasPotentialFeedbackLoop() const { return processorHasPotentialFeedbackLoop; }
|
|
|
|
void valueChanged (Value& value) override { muteInput = (bool) value.getValue(); }
|
|
|
|
|
|
|
|
//==============================================================================
|
|
|
|
File getLastFile() const
|
|
|
|
@@ -406,6 +410,7 @@ public: |
|
|
|
|
|
|
|
// avoid feedback loop by default
|
|
|
|
bool processorHasPotentialFeedbackLoop = true;
|
|
|
|
std::atomic<bool> muteInput { false };
|
|
|
|
Value shouldMuteInput;
|
|
|
|
AudioBuffer<float> emptyBuffer;
|
|
|
|
bool autoOpenMidiDevices;
|
|
|
|
@@ -492,9 +497,7 @@ private: |
|
|
|
int numOutputChannels,
|
|
|
|
int numSamples) override
|
|
|
|
{
|
|
|
|
const bool inputMuted = shouldMuteInput.getValue();
|
|
|
|
|
|
|
|
if (inputMuted)
|
|
|
|
if (muteInput)
|
|
|
|
{
|
|
|
|
emptyBuffer.clear();
|
|
|
|
inputChannelData = emptyBuffer.getArrayOfReadPointers();
|
|
|
|
|