mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Remove unnecessary code after moving to static shared code library
This commit is contained in:
parent
1635f47b29
commit
968cee4ad2
10 changed files with 23 additions and 58 deletions
|
|
@ -101,8 +101,6 @@ namespace juce
|
|||
const int32_t juceChunkType = 'juce';
|
||||
const int maxAAXChannels = 8;
|
||||
|
||||
JUCE_DEFINE_WRAPPER_TYPE (wrapperType_AAX);
|
||||
|
||||
//==============================================================================
|
||||
struct AAXClasses
|
||||
{
|
||||
|
|
@ -563,7 +561,7 @@ struct AAXClasses
|
|||
|
||||
static AAX_CEffectParameters* AAX_CALLBACK Create()
|
||||
{
|
||||
JUCE_DECLARE_WRAPPER_TYPE (wrapperType_AAX);
|
||||
PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_AAX;
|
||||
return new JuceAAX_Processor();
|
||||
}
|
||||
|
||||
|
|
@ -1549,7 +1547,7 @@ struct AAXClasses
|
|||
|
||||
static void getPlugInDescription (AAX_IEffectDescriptor& descriptor)
|
||||
{
|
||||
JUCE_DECLARE_WRAPPER_TYPE (wrapperType_AAX);
|
||||
PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_AAX;
|
||||
|
||||
ScopedPointer<AudioProcessor> plugin = createPluginFilterOfType (AudioProcessor::wrapperType_AAX);
|
||||
PluginBusUtilities busUtils (*plugin, false, maxAAXChannels);
|
||||
|
|
|
|||
|
|
@ -80,8 +80,6 @@
|
|||
|
||||
#include "juce_AU_Shared.h"
|
||||
|
||||
JUCE_DEFINE_WRAPPER_TYPE (wrapperType_AudioUnit);
|
||||
|
||||
//==============================================================================
|
||||
static Array<void*> activePlugins, activeUIs;
|
||||
|
||||
|
|
@ -2090,7 +2088,7 @@ private:
|
|||
extern "C" __attribute__((visibility("default"))) ComponentResult Name ## Suffix (ComponentParameters* params, Class* obj); \
|
||||
extern "C" __attribute__((visibility("default"))) ComponentResult Name ## Suffix (ComponentParameters* params, Class* obj) \
|
||||
{ \
|
||||
JUCE_DECLARE_WRAPPER_TYPE (wrapperType_AudioUnit); \
|
||||
PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_AudioUnit; \
|
||||
return ComponentEntryPoint<Class>::Dispatch (params, obj); \
|
||||
}
|
||||
|
||||
|
|
@ -2104,7 +2102,7 @@ private:
|
|||
extern "C" __attribute__((visibility("default"))) void* Name ## Factory (const AudioComponentDescription* desc); \
|
||||
extern "C" __attribute__((visibility("default"))) void* Name ## Factory (const AudioComponentDescription* desc) \
|
||||
{ \
|
||||
JUCE_DECLARE_WRAPPER_TYPE (wrapperType_AudioUnit); \
|
||||
PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_AudioUnit; \
|
||||
return FACTORY_BASE_CLASS<Class>::Factory (desc); \
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,8 +72,6 @@
|
|||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wnullability-completeness"
|
||||
|
||||
JUCE_DEFINE_WRAPPER_TYPE (wrapperType_AudioUnitv3);
|
||||
|
||||
// TODO: ask Timur: use SFINAE to automatically generate this for all NSObjects
|
||||
template <> struct ContainerDeletePolicy<AUAudioUnitBusArray> { static void destroy (NSObject* o) { [o release]; } };
|
||||
template <> struct ContainerDeletePolicy<AUParameterTree> { static void destroy (NSObject* o) { [o release]; } };
|
||||
|
|
@ -1183,7 +1181,7 @@ const double JuceAudioUnitv3::kDefaultSampleRate = 44100.0;
|
|||
|
||||
JuceAudioUnitv3Base* JuceAudioUnitv3Base::create (AUAudioUnit* audioUnit, AudioComponentDescription descr, AudioComponentInstantiationOptions options, NSError** error)
|
||||
{
|
||||
JUCE_DECLARE_WRAPPER_TYPE (wrapperType_AudioUnitv3);
|
||||
PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_AudioUnitv3;
|
||||
return new JuceAudioUnitv3 (audioUnit, descr, options, error);
|
||||
}
|
||||
|
||||
|
|
@ -1197,7 +1195,7 @@ public:
|
|||
{
|
||||
jassert (MessageManager::getInstance()->isThisTheMessageThread());
|
||||
|
||||
JUCE_DECLARE_WRAPPER_TYPE (wrapperType_AudioUnitv3);
|
||||
PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_AudioUnitv3;
|
||||
initialiseJuce_GUI();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -105,8 +105,6 @@
|
|||
|
||||
#include "../utility/juce_IncludeModuleHeaders.h"
|
||||
|
||||
JUCE_DEFINE_WRAPPER_TYPE (wrapperType_RTAS);
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma pack (pop)
|
||||
|
||||
|
|
@ -958,7 +956,7 @@ private:
|
|||
#if JUCE_WINDOWS
|
||||
Process::setCurrentModuleInstanceHandle (gThisModule);
|
||||
#endif
|
||||
JUCE_DECLARE_WRAPPER_TYPE (wrapperType_RTAS);
|
||||
PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_RTAS;
|
||||
initialiseJuce_GUI();
|
||||
|
||||
return new JucePlugInProcess();
|
||||
|
|
|
|||
|
|
@ -35,8 +35,6 @@
|
|||
#include <juce_gui_extra/juce_gui_extra.h>
|
||||
#include <juce_audio_utils/juce_audio_utils.h>
|
||||
|
||||
JUCE_DEFINE_WRAPPER_TYPE (wrapperType_Standalone);
|
||||
|
||||
// You can set this flag in your build if you need to specify a different
|
||||
// standalone JUCEApplication class for your app to use. If you don't
|
||||
// set it then by default we'll just create a simple one as below.
|
||||
|
|
@ -55,7 +53,7 @@ class StandaloneFilterApp : public JUCEApplication
|
|||
public:
|
||||
StandaloneFilterApp()
|
||||
{
|
||||
JUCE_DECLARE_WRAPPER_TYPE (wrapperType_Standalone);
|
||||
PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_Standalone;
|
||||
}
|
||||
|
||||
const String getApplicationName() override { return JucePlugin_Name; }
|
||||
|
|
|
|||
|
|
@ -111,8 +111,6 @@
|
|||
class JuceVSTWrapper;
|
||||
static bool recursionCheck = false;
|
||||
|
||||
JUCE_DEFINE_WRAPPER_TYPE (wrapperType_VST);
|
||||
|
||||
namespace juce
|
||||
{
|
||||
#if JUCE_MAC
|
||||
|
|
@ -1994,7 +1992,7 @@ namespace
|
|||
JUCE_EXPORTED_FUNCTION AEffect* VSTPluginMain (audioMasterCallback audioMaster);
|
||||
JUCE_EXPORTED_FUNCTION AEffect* VSTPluginMain (audioMasterCallback audioMaster)
|
||||
{
|
||||
JUCE_DECLARE_WRAPPER_TYPE (wrapperType_VST);
|
||||
PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_VST;
|
||||
|
||||
#if JUCE_MAC
|
||||
initialiseMacVST();
|
||||
|
|
@ -2006,7 +2004,7 @@ namespace
|
|||
JUCE_EXPORTED_FUNCTION AEffect* main_macho (audioMasterCallback audioMaster);
|
||||
JUCE_EXPORTED_FUNCTION AEffect* main_macho (audioMasterCallback audioMaster)
|
||||
{
|
||||
JUCE_DECLARE_WRAPPER_TYPE (wrapperType_VST);
|
||||
PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_VST;
|
||||
|
||||
#if JUCE_MAC
|
||||
initialiseMacVST();
|
||||
|
|
@ -2022,7 +2020,7 @@ namespace
|
|||
JUCE_EXPORTED_FUNCTION AEffect* VSTPluginMain (audioMasterCallback audioMaster);
|
||||
JUCE_EXPORTED_FUNCTION AEffect* VSTPluginMain (audioMasterCallback audioMaster)
|
||||
{
|
||||
JUCE_DECLARE_WRAPPER_TYPE (wrapperType_VST);
|
||||
PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_VST;
|
||||
|
||||
SharedMessageThread::getInstance();
|
||||
return pluginEntryPoint (audioMaster);
|
||||
|
|
@ -2031,7 +2029,7 @@ namespace
|
|||
JUCE_EXPORTED_FUNCTION AEffect* main_plugin (audioMasterCallback audioMaster) asm ("main");
|
||||
JUCE_EXPORTED_FUNCTION AEffect* main_plugin (audioMasterCallback audioMaster)
|
||||
{
|
||||
JUCE_DECLARE_WRAPPER_TYPE (wrapperType_VST);
|
||||
PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_VST;
|
||||
|
||||
return VSTPluginMain (audioMaster);
|
||||
}
|
||||
|
|
@ -2046,7 +2044,7 @@ namespace
|
|||
|
||||
extern "C" __declspec (dllexport) AEffect* VSTPluginMain (audioMasterCallback audioMaster)
|
||||
{
|
||||
JUCE_DECLARE_WRAPPER_TYPE (wrapperType_VST);
|
||||
PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_VST;
|
||||
|
||||
return pluginEntryPoint (audioMaster);
|
||||
}
|
||||
|
|
@ -2054,7 +2052,7 @@ namespace
|
|||
#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)
|
||||
{
|
||||
JUCE_DECLARE_WRAPPER_TYPE (wrapperType_VST);
|
||||
PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_VST;
|
||||
|
||||
return (int) pluginEntryPoint (audioMaster);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,8 +63,6 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
JUCE_DEFINE_WRAPPER_TYPE (wrapperType_VST3);
|
||||
|
||||
namespace juce
|
||||
{
|
||||
|
||||
|
|
@ -2410,7 +2408,7 @@ private:
|
|||
// The VST3 plugin entry point.
|
||||
JUCE_EXPORTED_FUNCTION IPluginFactory* PLUGIN_API GetPluginFactory()
|
||||
{
|
||||
JUCE_DECLARE_WRAPPER_TYPE (wrapperType_VST3);
|
||||
PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_VST3;
|
||||
|
||||
#if JUCE_WINDOWS
|
||||
// Cunning trick to force this function to be exported. Life's too short to
|
||||
|
|
|
|||
|
|
@ -22,18 +22,6 @@
|
|||
==============================================================================
|
||||
*/
|
||||
|
||||
#ifndef DOXYGEN
|
||||
// @internal
|
||||
extern JUCE_API int* jucePlugInClientCurrentWrapperType;
|
||||
|
||||
// this is ugly hack is needed by juce_getExecutableFile to have a wrapper
|
||||
// dependent symbol
|
||||
#define JUCE_DEFINE_WRAPPER_TYPE(x) JUCE_API int jucePlugInClientCurrentWrapperType_ ## x = static_cast<int> (AudioProcessor::x);
|
||||
#define JUCE_DECLARE_WRAPPER_TYPE(x) jucePlugInClientCurrentWrapperType = &jucePlugInClientCurrentWrapperType_ ## x;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
//==============================================================================
|
||||
class PluginHostType
|
||||
{
|
||||
|
|
@ -190,15 +178,15 @@ public:
|
|||
|
||||
@see AudioProcessor::wrapperType
|
||||
*/
|
||||
static AudioProcessor::WrapperType getPluginLoadedAs() noexcept
|
||||
{
|
||||
if (jucePlugInClientCurrentWrapperType != nullptr)
|
||||
return static_cast<AudioProcessor::WrapperType> (*jucePlugInClientCurrentWrapperType);
|
||||
|
||||
return AudioProcessor::wrapperType_Undefined;
|
||||
}
|
||||
static AudioProcessor::WrapperType getPluginLoadedAs() noexcept { return jucePlugInClientCurrentWrapperType; }
|
||||
|
||||
//==============================================================================
|
||||
|
||||
#ifndef DOXYGEN
|
||||
// @internal
|
||||
static AudioProcessor::WrapperType jucePlugInClientCurrentWrapperType;
|
||||
#endif
|
||||
|
||||
private:
|
||||
static HostType getHostType()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
namespace juce
|
||||
{
|
||||
int* jucePlugInClientCurrentWrapperType = nullptr;
|
||||
AudioProcessor::WrapperType PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_Undefined;
|
||||
}
|
||||
|
||||
#if _MSC_VER || JUCE_MINGW
|
||||
|
|
|
|||
|
|
@ -26,10 +26,6 @@
|
|||
==============================================================================
|
||||
*/
|
||||
|
||||
#ifdef JUCE_MODULE_AVAILABLE_juce_audio_plugin_client
|
||||
extern int* jucePlugInClientCurrentWrapperType;
|
||||
#endif
|
||||
|
||||
CriticalSection::CriticalSection() noexcept
|
||||
{
|
||||
pthread_mutexattr_t atts;
|
||||
|
|
@ -634,12 +630,7 @@ File juce_getExecutableFile()
|
|||
{
|
||||
Dl_info exeInfo;
|
||||
|
||||
#ifdef JUCE_MODULE_AVAILABLE_juce_audio_plugin_client
|
||||
void* localSymbol = jucePlugInClientCurrentWrapperType != nullptr ? (void*) jucePlugInClientCurrentWrapperType
|
||||
: (void*) juce_getExecutableFile;
|
||||
#else
|
||||
void* localSymbol = (void*) juce_getExecutableFile;
|
||||
#endif
|
||||
dladdr (localSymbol, &exeInfo);
|
||||
return CharPointer_UTF8 (exeInfo.dli_fname);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue