Don't show "Audio input is muted" banner

Hi,

I’m writing a JUCE plugin which can also be deployed to standalone app. The plugin is in fact just a MIDI controller for a synthesiser (it just sends MIDI OUT), but I want to have it as an audio plugin so it can be added in audio processing chains (i.e. in next to the “external input” of a Live device). I’ve seen this kind of plugins by other companies work in this way. The fact is that I want to remove the “Audio input is muted” that shows by default as there’s no need for that in my case. I’ve been searching how to do that but found no relevant info. How can I stop that banner from showing at app startup?

Thanks!

1 Like

I seem to recall the solution was to stare very hard at the way the standalone app works, copy some source files and implement my own version. It was a pain :slight_smile:

Trying to find a good way to do this. Anyone got any ideas?

The StandalonePluginHolder has a public member muteInput.

I would try to set this to false in your AudioProcessor’s constructor:

if (juce::JUCEApplicationBase::isStandaloneApp())
{
    if (auto* pluginHolder = juce::StandalonePluginHolder::getInstance())
        pluginHolder->muteInput = false;
}

Untested, let me know if it works.

EDIT: could also be shouldMuteInput… seems to need a closer look into the sources

I also noticed that member but we don’t we have access to juce::StandalonePluginHolder in plugin code, right?

We do with the code snippet I posted above.
The StandalonePluginHolder is a singleton, which would return nullptr in case of a plugin, so you can even remove the isStandaloneApp() check. But I like to play it safe and it is non performance critical code.

I had to make one change but this seems to work:

  if (juce::JUCEApplicationBase::isStandaloneApp())
  {
      if (auto* pluginHolder = juce::StandalonePluginHolder::getInstance())
      {
        pluginHolder->getMuteInputValue().setValue(false);
      }
  }

Thanks, Daniel!
Your tip got me there.

3 Likes

This doesn’t when I called it in the AudioProcessor’s Constructor, because the StandalonePluginHolder is not fully constructed yet.

But it works when I call it in the AudioProcessorEditor’s constructor, once the StandalonePluginHolder is fully constructed.

1 Like