| @@ -124,7 +124,7 @@ public: | |||
| bool isOSX() const override { return ! iOS; } | |||
| bool isiOS() const override { return iOS; } | |||
| bool supportsVST() const override { return true; } | |||
| bool supportsVST() const override { return ! iOS; } | |||
| bool supportsVST3() const override { return ! iOS; } | |||
| bool supportsAAX() const override { return ! iOS; } | |||
| bool supportsRTAS() const override { return ! iOS; } | |||
| @@ -270,13 +270,11 @@ public: | |||
| firstProcessCallback (true), | |||
| shouldDeleteEditor (false), | |||
| #if JUCE_64BIT | |||
| useNSView (true) | |||
| useNSView (true), | |||
| #else | |||
| useNSView (false) | |||
| #endif | |||
| #if ! JUCE_IOS | |||
| , hostWindow (0) | |||
| useNSView (false), | |||
| #endif | |||
| hostWindow (0) | |||
| { | |||
| busUtils.init(); | |||
| @@ -343,9 +341,7 @@ public: | |||
| delete filter; | |||
| filter = nullptr; | |||
| #if ! JUCE_IOS | |||
| jassert (editorComp == 0); | |||
| #endif | |||
| deleteTempChannels(); | |||
| @@ -1347,7 +1343,6 @@ public: | |||
| void createEditorComp() | |||
| { | |||
| #if ! JUCE_IOS | |||
| if (hasShutdown || filter == nullptr) | |||
| return; | |||
| @@ -1366,16 +1361,12 @@ public: | |||
| cEffect.flags &= ~effFlagsHasEditor; | |||
| } | |||
| } | |||
| #endif | |||
| shouldDeleteEditor = false; | |||
| } | |||
| void deleteEditor (bool canDeleteLaterIfModal) | |||
| { | |||
| #if JUCE_IOS | |||
| ignoreUnused (canDeleteLaterIfModal); | |||
| #else | |||
| JUCE_AUTORELEASEPOOL | |||
| { | |||
| PopupMenu::dismissAllActiveMenus(); | |||
| @@ -1417,7 +1408,6 @@ public: | |||
| hostWindow = 0; | |||
| #endif | |||
| } | |||
| #endif | |||
| } | |||
| VstIntPtr dispatcher (VstInt32 opCode, VstInt32 index, VstIntPtr value, void* ptr, float opt) override | |||
| @@ -1425,7 +1415,6 @@ public: | |||
| if (hasShutdown) | |||
| return 0; | |||
| #if ! JUCE_IOS | |||
| if (opCode == effEditIdle) | |||
| { | |||
| doIdleCallback(); | |||
| @@ -1455,7 +1444,7 @@ public: | |||
| hostWindow = (Window) ptr; | |||
| Window editorWnd = (Window) editorComp->getWindowHandle(); | |||
| XReparentWindow (display, editorWnd, hostWindow, 0, 0); | |||
| #elif JUCE_MAC | |||
| #else | |||
| hostWindow = attachComponentToWindowRefVST (editorComp, ptr, useNSView); | |||
| #endif | |||
| editorComp->setVisible (true); | |||
| @@ -1490,11 +1479,10 @@ public: | |||
| return 0; | |||
| } | |||
| #endif | |||
| return AudioEffectX::dispatcher (opCode, index, value, ptr, opt); | |||
| } | |||
| #if ! JUCE_IOS | |||
| void resizeHostWindow (int newWidth, int newHeight) | |||
| { | |||
| if (editorComp != nullptr) | |||
| @@ -1683,7 +1671,6 @@ public: | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (EditorCompWrapper) | |||
| }; | |||
| #endif | |||
| //============================================================================== | |||
| private: | |||
| @@ -1691,10 +1678,8 @@ private: | |||
| PluginBusUtilities busUtils; | |||
| juce::MemoryBlock chunkMemory; | |||
| juce::uint32 chunkMemoryTime; | |||
| #if ! JUCE_IOS | |||
| ScopedPointer<EditorCompWrapper> editorComp; | |||
| ERect editorSize; | |||
| #endif | |||
| MidiBuffer midiEvents; | |||
| VSTMidiEventList outgoingEvents; | |||
| bool isProcessing, isBypassed, hasShutdown, isInSizeWindow, firstProcessCallback; | |||
| @@ -1707,7 +1692,7 @@ private: | |||
| void* hostWindow; | |||
| #elif JUCE_LINUX | |||
| Window hostWindow; | |||
| #elif JUCE_WINDOWS | |||
| #else | |||
| HWND hostWindow; | |||
| #endif | |||
| @@ -2001,17 +1986,14 @@ namespace | |||
| //============================================================================== | |||
| // Mac startup code.. | |||
| #if JUCE_MAC || JUCE_IOS | |||
| #if JUCE_MAC | |||
| JUCE_EXPORTED_FUNCTION AEffect* VSTPluginMain (audioMasterCallback audioMaster); | |||
| JUCE_EXPORTED_FUNCTION AEffect* VSTPluginMain (audioMasterCallback audioMaster) | |||
| { | |||
| PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_VST; | |||
| #if JUCE_MAC | |||
| initialiseMacVST(); | |||
| #endif | |||
| return pluginEntryPoint (audioMaster); | |||
| } | |||
| @@ -2020,10 +2002,7 @@ namespace | |||
| { | |||
| PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_VST; | |||
| #if JUCE_MAC | |||
| initialiseMacVST(); | |||
| #endif | |||
| return pluginEntryPoint (audioMaster); | |||
| } | |||
| @@ -65,7 +65,7 @@ void AudioPluginFormatManager::addDefaultFormats() | |||
| // you should only call this method once! | |||
| for (int i = formats.size(); --i >= 0;) | |||
| { | |||
| #if JUCE_PLUGINHOST_VST && (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX || JUCE_IOS) | |||
| #if JUCE_PLUGINHOST_VST && (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX) | |||
| jassert (dynamic_cast<VSTPluginFormat*> (formats[i]) == nullptr); | |||
| #endif | |||
| @@ -87,7 +87,7 @@ void AudioPluginFormatManager::addDefaultFormats() | |||
| formats.add (new AudioUnitPluginFormat()); | |||
| #endif | |||
| #if JUCE_PLUGINHOST_VST && (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX || JUCE_IOS) | |||
| #if JUCE_PLUGINHOST_VST && (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX) | |||
| formats.add (new VSTPluginFormat()); | |||
| #endif | |||
| @@ -22,7 +22,7 @@ | |||
| ============================================================================== | |||
| */ | |||
| #if JUCE_PLUGINHOST_VST && (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX || JUCE_IOS) | |||
| #if JUCE_PLUGINHOST_VST && (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX) | |||
| //============================================================================== | |||
| #if JUCE_MAC && JUCE_SUPPORT_CARBON | |||
| @@ -165,7 +165,7 @@ namespace | |||
| { | |||
| #if JUCE_WINDOWS | |||
| return timeGetTime() * 1000000.0; | |||
| #elif JUCE_LINUX || JUCE_IOS | |||
| #elif JUCE_LINUX | |||
| timeval micro; | |||
| gettimeofday (µ, 0); | |||
| return micro.tv_usec * 1000.0; | |||
| @@ -378,7 +378,7 @@ public: | |||
| { | |||
| getActiveModules().add (this); | |||
| #if JUCE_WINDOWS || JUCE_LINUX || JUCE_IOS | |||
| #if JUCE_WINDOWS || JUCE_LINUX | |||
| fullParentDirectoryPathName = f.getParentDirectory().getFullPathName(); | |||
| #elif JUCE_MAC | |||
| FSRef ref; | |||
| @@ -394,12 +394,9 @@ public: | |||
| } | |||
| //============================================================================== | |||
| #if ! JUCE_MAC | |||
| String fullParentDirectoryPathName; | |||
| #endif | |||
| #if JUCE_WINDOWS || JUCE_LINUX | |||
| #if JUCE_WINDOWS || JUCE_LINUX | |||
| DynamicLibrary module; | |||
| String fullParentDirectoryPathName; | |||
| bool open() | |||
| { | |||
| @@ -463,14 +460,11 @@ public: | |||
| return String(); | |||
| } | |||
| #endif | |||
| #else | |||
| #else | |||
| Handle resHandle; | |||
| CFBundleRef bundleRef; | |||
| #if JUCE_MAC | |||
| CFBundleRefNum resFileId; | |||
| FSSpec parentDirFSSpec; | |||
| #endif | |||
| ResFileRefNum resFileId; | |||
| bool open() | |||
| { | |||
| @@ -516,18 +510,13 @@ public: | |||
| if (pluginName.isEmpty()) | |||
| pluginName = file.getFileNameWithoutExtension(); | |||
| #if JUCE_MAC | |||
| resFileId = CFBundleOpenBundleResourceMap (bundleRef); | |||
| #endif | |||
| ok = true; | |||
| Array<File> vstXmlFiles; | |||
| file | |||
| #if JUCE_MAC | |||
| .getChildFile ("Contents") | |||
| file.getChildFile ("Contents") | |||
| .getChildFile ("Resources") | |||
| #endif | |||
| .findChildFiles (vstXmlFiles, File::findFiles, false, "*.vstxml"); | |||
| if (vstXmlFiles.size() > 0) | |||
| @@ -552,9 +541,7 @@ public: | |||
| { | |||
| if (bundleRef != 0) | |||
| { | |||
| #if JUCE_MAC | |||
| CFBundleCloseBundleResourceMap (bundleRef, resFileId); | |||
| #endif | |||
| if (CFGetRetainCount (bundleRef) == 1) | |||
| CFBundleUnloadExecutable (bundleRef); | |||
| @@ -569,7 +556,7 @@ public: | |||
| eff->dispatcher (eff, effClose, 0, 0, 0, 0); | |||
| } | |||
| #endif | |||
| #endif | |||
| private: | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ModuleHandle) | |||
| @@ -888,12 +875,7 @@ public: | |||
| } | |||
| //============================================================================== | |||
| #if JUCE_IOS | |||
| bool hasEditor() const override { return false; } | |||
| #else | |||
| bool hasEditor() const override { return effect != nullptr && (effect->flags & effFlagsHasEditor) != 0; } | |||
| #endif | |||
| AudioProcessorEditor* createEditor() override; | |||
| //============================================================================== | |||
| @@ -1824,7 +1806,6 @@ private: | |||
| }; | |||
| //============================================================================== | |||
| #if ! JUCE_IOS | |||
| class VSTPluginWindow; | |||
| static Array<VSTPluginWindow*> activeVSTWindows; | |||
| @@ -2563,7 +2544,7 @@ private: | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (VSTPluginWindow) | |||
| }; | |||
| #endif | |||
| #if JUCE_MSVC | |||
| #pragma warning (pop) | |||
| #endif | |||
| @@ -2571,12 +2552,8 @@ private: | |||
| //============================================================================== | |||
| AudioProcessorEditor* VSTPluginInstance::createEditor() | |||
| { | |||
| #if JUCE_IOS | |||
| return nullptr; | |||
| #else | |||
| return hasEditor() ? new VSTPluginWindow (*this) | |||
| : nullptr; | |||
| #endif | |||
| } | |||
| //============================================================================== | |||
| @@ -2713,7 +2690,7 @@ bool VSTPluginFormat::fileMightContainThisPluginType (const String& fileOrIdenti | |||
| { | |||
| const File f (File::createFileWithoutCheckingPath (fileOrIdentifier)); | |||
| #if JUCE_MAC || JUCE_IOS | |||
| #if JUCE_MAC | |||
| return f.isDirectory() && f.hasFileExtension (".vst"); | |||
| #elif JUCE_WINDOWS | |||
| return f.existsAsFile() && f.hasFileExtension (".dll"); | |||
| @@ -2788,19 +2765,6 @@ FileSearchPath VSTPluginFormat::getDefaultLocationsToSearch() | |||
| paths.add (WindowsRegistry::getValue ("HKEY_LOCAL_MACHINE\\Software\\VST\\VSTPluginsPath", | |||
| programFiles + "\\VstPlugins")); | |||
| return paths; | |||
| #elif JUCE_IOS | |||
| // on iOS you can only load plug-ins inside the hosts bundle folder | |||
| CFURLRef relativePluginDir = CFBundleCopyBuiltInPlugInsURL (CFBundleGetMainBundle()); | |||
| CFURLRef pluginDir = CFURLCopyAbsoluteURL (relativePluginDir); | |||
| CFRelease (relativePluginDir); | |||
| CFStringRef path = CFURLCopyFileSystemPath (pluginDir, kCFURLPOSIXPathStyle); | |||
| CFRelease (pluginDir); | |||
| FileSearchPath retval (String (CFStringGetCStringPtr (path, kCFStringEncodingUTF8))); | |||
| CFRelease (path); | |||
| return retval; | |||
| #endif | |||
| } | |||
| @@ -22,7 +22,7 @@ | |||
| ============================================================================== | |||
| */ | |||
| #if (JUCE_PLUGINHOST_VST && (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX || JUCE_IOS)) || DOXYGEN | |||
| #if (JUCE_PLUGINHOST_VST && (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX)) || DOXYGEN | |||
| //============================================================================== | |||
| /** | |||
| @@ -348,10 +348,8 @@ public: | |||
| if (path.getNumPaths() > 0) // if the path is empty, then paths aren't used for this format. | |||
| { | |||
| #if ! JUCE_IOS | |||
| if (propertiesToUse != nullptr) | |||
| path = getLastSearchPath (*propertiesToUse, formatToScan); | |||
| #endif | |||
| pathList.setSize (500, 300); | |||
| pathList.setPath (path); | |||