Add support for AudioUnit and LADSPA plugin formats#12
Open
eliot-akira wants to merge 1 commit intobacklit-studio:masterfrom
Open
Add support for AudioUnit and LADSPA plugin formats#12eliot-akira wants to merge 1 commit intobacklit-studio:masterfrom
eliot-akira wants to merge 1 commit intobacklit-studio:masterfrom
Conversation
eliot-akira
commented
Apr 1, 2018
|
|
||
| description = foundPlugins[0]; | ||
| AudioPluginInstance *instance = format.createInstanceFromDescription( | ||
| #if (JUCE_PLUGINHOST_VST3 && (JUCE_MAC || JUCE_WINDOWS)) |
Contributor
Author
There was a problem hiding this comment.
I had to use these constants to detect if each plugin format class is defined. I don't know if there's a cleaner way to do it.
eliot-akira
commented
Apr 1, 2018
| description = foundPlugins[0]; | ||
| AudioPluginInstance *instance = format.createInstanceFromDescription( | ||
| #if (JUCE_PLUGINHOST_VST3 && (JUCE_MAC || JUCE_WINDOWS)) | ||
| if (pluginPath.endsWith(".vst3")) { |
Contributor
Author
There was a problem hiding this comment.
I found this method .endsWith() in JUCE::String class.
backlit-studio
requested changes
Apr 3, 2018
| // TODO: this->shutdown(); | ||
| return; | ||
| } | ||
|
|
Owner
There was a problem hiding this comment.
This is the right approach I think, thanks a lot.
We should be able to clean this up a bit by pulling all of the macros and path checking into a private function that just returns an AudioUnitPluginFormat instance (the base class of LADSPAPluginFormat, AudioUnitPluginFormat and VST3PluginFormat)
something like
AudioUnitPluginFormat format = getPluginFormat(pluginPath)
formatAU.findAllTypesForFile(foundPlugins, pluginPath);
description = foundPlugins[0];
instance = formatAU.createInstanceFromDescription(*description, setup.sampleRate, setup.bufferSize);
where getPluginFormat is something like:
AudioPluginFormat getPluginFormat(const String &commandLine) {
#if (JUCE_PLUGINHOST_LADSPA && JUCE_LINUX)
if (pluginPath.endsWith(".so")) { return LADSPAPluginFormat();}
#endif
...
}
Would you mind giving that shot?
Thanks again!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I confirmed that it works for AudioUnit effects. Haven't tested AudioUnit instruments, nor LADSPA plugins on Linux.
As mentioned in issue #9, I'm not so familiar with C++ so the code could probably be written more efficiently. Any advice would be appreciated. 😉