From 0301e9d1e4f6ffca19276a30aea4e30046acb8e2 Mon Sep 17 00:00:00 2001 From: jules Date: Tue, 10 Jan 2012 11:35:46 +0000 Subject: [PATCH] Introjucer RTAS fix. VST fix for intel compiler. --- .../Source/Project/jucer_AudioPluginModule.h | 14 +++++++++++++- .../VST/juce_VST_Wrapper.cpp | 6 +++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/extras/Introjucer/Source/Project/jucer_AudioPluginModule.h b/extras/Introjucer/Source/Project/jucer_AudioPluginModule.h index 5d3581a3e3..5b975c974d 100644 --- a/extras/Introjucer/Source/Project/jucer_AudioPluginModule.h +++ b/extras/Introjucer/Source/Project/jucer_AudioPluginModule.h @@ -50,6 +50,18 @@ namespace Value getPluginAUCocoaViewClassName (const Project& project) { return project.getProjectValue ("pluginAUViewClass"); } Value getPluginRTASCategory (const Project& project) { return project.getProjectValue ("pluginRTASCategory"); } + String getPluginRTASCategoryCode (const Project& project) + { + if (static_cast (getPluginIsSynth (project).getValue())) + return "ePlugInCategory_SWGenerators"; + + String s (getPluginRTASCategory (project).toString()); + if (s.isEmpty()) + s = "ePlugInCategory_None"; + + return s; + } + int countMaxPluginChannels (const String& configString, bool isInput) { StringArray configs; @@ -103,7 +115,7 @@ namespace << "#define JucePlugin_AUManufacturerCode JucePlugin_ManufacturerCode" << newLine << "#define JucePlugin_CFBundleIdentifier " << project.getBundleIdentifier().toString() << newLine << "#define JucePlugin_AUCocoaViewClassName " << getPluginAUCocoaViewClassName (project).toString() << newLine - << "#define JucePlugin_RTASCategory " << ((bool) getPluginIsSynth (project).getValue() ? "ePlugInCategory_SWGenerators" : "ePlugInCategory_None") << newLine + << "#define JucePlugin_RTASCategory " << getPluginRTASCategoryCode (project) << newLine << "#define JucePlugin_RTASManufacturerCode JucePlugin_ManufacturerCode" << newLine << "#define JucePlugin_RTASProductId JucePlugin_PluginCode" << newLine << newLine; diff --git a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp index 56bf46c7f6..5efad9846a 100644 --- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp @@ -1448,10 +1448,10 @@ namespace return pluginEntryPoint (audioMaster); } - #ifndef _WIN64 // (can't compile this on win64, but it's not needed anyway with VST2.4) - extern "C" __declspec (dllexport) void* main (audioMasterCallback audioMaster) + #ifndef JUCE_64BIT // (can't compile this on win64, but it's not needed anyway with VST2.4) + extern "C" __declspec (dllexport) int main (audioMasterCallback audioMaster) { - return (void*) pluginEntryPoint (audioMaster); + return (int) pluginEntryPoint (audioMaster); } #endif