openshot-audio  0.1.7
juce_VSTPluginFormat.h
Go to the documentation of this file.
1 /*
2  ==============================================================================
3 
4  This file is part of the JUCE library.
5  Copyright (c) 2015 - ROLI Ltd.
6 
7  Permission is granted to use this software under the terms of either:
8  a) the GPL v2 (or any later version)
9  b) the Affero GPL v3
10 
11  Details of these licenses can be found at: www.gnu.org/licenses
12 
13  JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
14  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
15  A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 
17  ------------------------------------------------------------------------------
18 
19  To release a closed-source product which uses JUCE, commercial licenses are
20  available: visit www.juce.com for more information.
21 
22  ==============================================================================
23 */
24 
25 #if JUCE_PLUGINHOST_VST || DOXYGEN
26 
27 //==============================================================================
31 class JUCE_API VSTPluginFormat : public AudioPluginFormat
32 {
33 public:
34  //==============================================================================
35  VSTPluginFormat();
36  ~VSTPluginFormat();
37 
38  //==============================================================================
42  static const XmlElement* getVSTXML (AudioPluginInstance* plugin);
43 
45  static bool loadFromFXBFile (AudioPluginInstance* plugin, const void* data, size_t dataSize);
46 
48  static bool saveToFXBFile (AudioPluginInstance* plugin, MemoryBlock& result, bool asFXB);
49 
51  static bool getChunkData (AudioPluginInstance* plugin, MemoryBlock& result, bool isPreset);
52 
54  static bool setChunkData (AudioPluginInstance* plugin, const void* data, int size, bool isPreset);
55 
56  //==============================================================================
58  class ExtraFunctions
59  {
60  public:
61  virtual ~ExtraFunctions() {}
62 
64  virtual int64 getTempoAt (int64 samplePos) = 0;
65 
69  virtual int getAutomationState() = 0;
70  };
71 
75  static void setExtraFunctions (AudioPluginInstance* plugin, ExtraFunctions* functions);
76 
77  //==============================================================================
78  #if JUCE_64BIT
79  typedef int64 VstIntPtr;
80  #else
81  typedef int32 VstIntPtr;
82  #endif
83 
85  static VstIntPtr JUCE_CALLTYPE dispatcher (AudioPluginInstance*, int32, int32, VstIntPtr, void*, float);
86 
87  //==============================================================================
88  String getName() const override { return "VST"; }
89  void findAllTypesForFile (OwnedArray<PluginDescription>&, const String& fileOrIdentifier) override;
90  AudioPluginInstance* createInstanceFromDescription (const PluginDescription&, double, int) override;
91  bool fileMightContainThisPluginType (const String& fileOrIdentifier) override;
92  String getNameOfPluginFromIdentifier (const String& fileOrIdentifier) override;
93  bool pluginNeedsRescanning (const PluginDescription&) override;
94  StringArray searchPathsForPlugins (const FileSearchPath&, bool recursive) override;
95  bool doesPluginStillExist (const PluginDescription&) override;
96  FileSearchPath getDefaultLocationsToSearch() override;
97  bool canScanForPlugins() const override { return true; }
98 
104  virtual void aboutToScanVSTShellPlugin (const PluginDescription&);
105 
106 private:
107  void recursiveFileSearch (StringArray&, const File&, bool recursive);
108 
110 };
111 
112 
113 #endif
Definition: juce_AudioPluginFormat.h:35
Definition: juce_MemoryBlock.h:38
#define JUCE_CALLTYPE
Definition: juce_PlatformDefs.h:50
Definition: juce_String.h:43
#define JUCE_API
Definition: juce_StandardHeader.h:139
Definition: juce_XmlElement.h:142
Definition: juce_FileSearchPath.h:39
Definition: juce_PluginDescription.h:40
long long int64
Definition: juce_MathsFunctions.h:60
Definition: juce_StringArray.h:39
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
Definition: juce_PlatformDefs.h:198
Definition: juce_AudioPluginInstance.h:42
Definition: juce_File.h:45
signed int int32
Definition: juce_MathsFunctions.h:49