Add TAL-Reverb-II plugin to test
[juce-lv2.git] / juce / source / src / audio / plugin_host / juce_AudioPluginFormat.h
blob18aa267ade4489edcde30592c1759eb94c149dda
1 /*
2 ==============================================================================
4 This file is part of the JUCE library - "Jules' Utility Class Extensions"
5 Copyright 2004-11 by Raw Material Software Ltd.
7 ------------------------------------------------------------------------------
9 JUCE can be redistributed and/or modified under the terms of the GNU General
10 Public License (Version 2), as published by the Free Software Foundation.
11 A copy of the license is included in the JUCE distribution, or can be found
12 online at www.gnu.org/licenses.
14 JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
16 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
18 ------------------------------------------------------------------------------
20 To release a closed-source product which uses JUCE, commercial licenses are
21 available: visit www.rawmaterialsoftware.com/juce for more information.
23 ==============================================================================
26 #ifndef __JUCE_AUDIOPLUGINFORMAT_JUCEHEADER__
27 #define __JUCE_AUDIOPLUGINFORMAT_JUCEHEADER__
29 #include "juce_AudioPluginInstance.h"
30 #include "../../io/files/juce_FileSearchPath.h"
31 class PluginDescription;
34 //==============================================================================
35 /**
36 The base class for a type of plugin format, such as VST, AudioUnit, LADSPA, etc.
38 Use the static getNumFormats() and getFormat() calls to find the types
39 of format that are available.
41 class JUCE_API AudioPluginFormat
43 public:
44 //==============================================================================
45 /** Destructor. */
46 virtual ~AudioPluginFormat();
48 //==============================================================================
49 /** Returns the format name.
51 E.g. "VST", "AudioUnit", etc.
53 virtual String getName() const = 0;
55 /** This tries to create descriptions for all the plugin types available in
56 a binary module file.
58 The file will be some kind of DLL or bundle.
60 Normally there will only be one type returned, but some plugins
61 (e.g. VST shells) can use a single DLL to create a set of different plugin
62 subtypes, so in that case, each subtype is returned as a separate object.
64 virtual void findAllTypesForFile (OwnedArray <PluginDescription>& results,
65 const String& fileOrIdentifier) = 0;
67 /** Tries to recreate a type from a previously generated PluginDescription.
69 @see PluginDescription::createInstance
71 virtual AudioPluginInstance* createInstanceFromDescription (const PluginDescription& desc) = 0;
73 /** Should do a quick check to see if this file or directory might be a plugin of
74 this format.
76 This is for searching for potential files, so it shouldn't actually try to
77 load the plugin or do anything time-consuming.
79 virtual bool fileMightContainThisPluginType (const String& fileOrIdentifier) = 0;
81 /** Returns a readable version of the name of the plugin that this identifier refers to.
83 virtual String getNameOfPluginFromIdentifier (const String& fileOrIdentifier) = 0;
85 /** Checks whether this plugin could possibly be loaded.
87 It doesn't actually need to load it, just to check whether the file or component
88 still exists.
90 virtual bool doesPluginStillExist (const PluginDescription& desc) = 0;
92 /** Searches a suggested set of directories for any plugins in this format.
94 The path might be ignored, e.g. by AUs, which are found by the OS rather
95 than manually.
97 virtual StringArray searchPathsForPlugins (const FileSearchPath& directoriesToSearch,
98 bool recursive) = 0;
100 /** Returns the typical places to look for this kind of plugin.
102 Note that if this returns no paths, it means that the format can't be scanned-for
103 (i.e. it's an internal format that doesn't live in files)
105 virtual FileSearchPath getDefaultLocationsToSearch() = 0;
108 protected:
109 //==============================================================================
110 AudioPluginFormat() noexcept;
112 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioPluginFormat);
116 #endif // __JUCE_AUDIOPLUGINFORMAT_JUCEHEADER__