- clean working copy for leaving SVN
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
This file is part of the JUCE library.
|
||||
Copyright (c) 2013 - Raw Material Software Ltd.
|
||||
|
||||
Permission is granted to use this software under the terms of either:
|
||||
a) the GPL v2 (or any later version)
|
||||
b) the Affero GPL v3
|
||||
|
||||
Details of these licenses can be found at: www.gnu.org/licenses
|
||||
|
||||
JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
To release a closed-source product which uses JUCE, commercial licenses are
|
||||
available: visit www.juce.com for more information.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
#ifndef JUCE_CARBONVISIBILITY_H_INCLUDED
|
||||
#define JUCE_CARBONVISIBILITY_H_INCLUDED
|
||||
|
||||
//==============================================================================
|
||||
#if JUCE_SUPPORT_CARBON && JUCE_MAC_WINDOW_VISIBITY_BODGE
|
||||
|
||||
/* When you wrap a WindowRef as an NSWindow, it seems to bugger up the HideWindow
|
||||
function, so when the host tries (and fails) to hide the window, this stuff catches
|
||||
the event and forces it to update.
|
||||
*/
|
||||
static pascal OSStatus windowVisibilityBodge (EventHandlerCallRef, EventRef e, void* user)
|
||||
{
|
||||
NSWindow* hostWindow = (NSWindow*) user;
|
||||
|
||||
switch (GetEventKind (e))
|
||||
{
|
||||
case kEventWindowInit: [hostWindow display]; break;
|
||||
case kEventWindowShown: [hostWindow orderFront: nil]; break;
|
||||
case kEventWindowHidden: [hostWindow orderOut: nil]; break;
|
||||
}
|
||||
|
||||
return eventNotHandledErr;
|
||||
}
|
||||
|
||||
static void attachWindowHidingHooks (Component* comp, void* hostWindowRef, NSWindow* nsWindow)
|
||||
{
|
||||
const EventTypeSpec eventsToCatch[] =
|
||||
{
|
||||
{ kEventClassWindow, kEventWindowInit },
|
||||
{ kEventClassWindow, kEventWindowShown },
|
||||
{ kEventClassWindow, kEventWindowHidden }
|
||||
};
|
||||
|
||||
EventHandlerRef ref;
|
||||
InstallWindowEventHandler ((WindowRef) hostWindowRef,
|
||||
NewEventHandlerUPP (windowVisibilityBodge),
|
||||
GetEventTypeCount (eventsToCatch), eventsToCatch,
|
||||
(void*) nsWindow, &ref);
|
||||
|
||||
comp->getProperties().set ("carbonEventRef", String::toHexString ((pointer_sized_int) (void*) ref));
|
||||
}
|
||||
|
||||
static void removeWindowHidingHooks (Component* comp)
|
||||
{
|
||||
if (comp != nullptr)
|
||||
RemoveEventHandler ((EventHandlerRef) (void*) (pointer_sized_int)
|
||||
comp->getProperties() ["carbonEventRef"].toString().getHexValue64());
|
||||
}
|
||||
|
||||
#elif JUCE_MAC
|
||||
static void attachWindowHidingHooks (void*, void*, void*) {}
|
||||
static void removeWindowHidingHooks (void*) {}
|
||||
#endif
|
||||
|
||||
#endif // JUCE_CARBONVISIBILITY_H_INCLUDED
|
||||
@@ -0,0 +1,105 @@
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
This file is part of the JUCE library.
|
||||
Copyright (c) 2013 - Raw Material Software Ltd.
|
||||
|
||||
Permission is granted to use this software under the terms of either:
|
||||
a) the GPL v2 (or any later version)
|
||||
b) the Affero GPL v3
|
||||
|
||||
Details of these licenses can be found at: www.gnu.org/licenses
|
||||
|
||||
JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
To release a closed-source product which uses JUCE, commercial licenses are
|
||||
available: visit www.juce.com for more information.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
// The following checks should cause a compile error if you've forgotten to
|
||||
// define all your plugin settings properly..
|
||||
|
||||
#if ! (JucePlugin_Build_VST || JucePlugin_Build_VST3 \
|
||||
|| JucePlugin_Build_AU || JucePlugin_Build_RTAS || JucePlugin_Build_AAX \
|
||||
|| JucePlugin_Build_Standalone || JucePlugin_Build_LV2)
|
||||
#error "You need to enable at least one plugin format!"
|
||||
#endif
|
||||
|
||||
#ifndef JucePlugin_IsSynth
|
||||
#error "You need to define the JucePlugin_IsSynth value!"
|
||||
#endif
|
||||
|
||||
#ifndef JucePlugin_ManufacturerCode
|
||||
#error "You need to define the JucePlugin_ManufacturerCode value!"
|
||||
#endif
|
||||
|
||||
#ifndef JucePlugin_PluginCode
|
||||
#error "You need to define the JucePlugin_PluginCode value!"
|
||||
#endif
|
||||
|
||||
#ifndef JucePlugin_ProducesMidiOutput
|
||||
#error "You need to define the JucePlugin_ProducesMidiOutput value!"
|
||||
#endif
|
||||
|
||||
#ifndef JucePlugin_WantsMidiInput
|
||||
#error "You need to define the JucePlugin_WantsMidiInput value!"
|
||||
#endif
|
||||
|
||||
#ifndef JucePlugin_MaxNumInputChannels
|
||||
#error "You need to define the JucePlugin_MaxNumInputChannels value!"
|
||||
#endif
|
||||
|
||||
#ifndef JucePlugin_MaxNumOutputChannels
|
||||
#error "You need to define the JucePlugin_MaxNumOutputChannels value!"
|
||||
#endif
|
||||
|
||||
#ifndef JucePlugin_PreferredChannelConfigurations
|
||||
#error "You need to define the JucePlugin_PreferredChannelConfigurations value!"
|
||||
#endif
|
||||
|
||||
#ifdef JucePlugin_Latency
|
||||
#error "JucePlugin_Latency is now deprecated - instead, call the AudioProcessor::setLatencySamples() method if your plugin has a non-zero delay"
|
||||
#endif
|
||||
|
||||
#ifndef JucePlugin_SilenceInProducesSilenceOut
|
||||
#error "You need to define the JucePlugin_SilenceInProducesSilenceOut value!"
|
||||
#endif
|
||||
|
||||
#ifndef JucePlugin_EditorRequiresKeyboardFocus
|
||||
#error "You need to define the JucePlugin_EditorRequiresKeyboardFocus value!"
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
#if _WIN64 || (__LP64__ && (defined (__APPLE_CPP__) || defined (__APPLE_CC__)))
|
||||
#undef JucePlugin_Build_RTAS
|
||||
#define JucePlugin_Build_RTAS 0
|
||||
#endif
|
||||
|
||||
#if ! (defined (_MSC_VER) || defined (__APPLE_CPP__) || defined (__APPLE_CC__))
|
||||
#undef JucePlugin_Build_VST3
|
||||
#define JucePlugin_Build_VST3 0
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
#if JucePlugin_Build_RTAS && _MSC_VER && ! defined (JucePlugin_WinBag_path)
|
||||
#error "You need to define the JucePlugin_WinBag_path value!"
|
||||
#endif
|
||||
|
||||
#if JucePlugin_Build_LV2 && ! defined (JucePlugin_LV2URI)
|
||||
#error "You need to define the JucePlugin_LV2URI value!"
|
||||
#endif
|
||||
|
||||
#if JucePlugin_Build_AAX && ! defined (JucePlugin_AAXIdentifier)
|
||||
#error "You need to define the JucePlugin_AAXIdentifier value!"
|
||||
#endif
|
||||
|
||||
#if defined (__ppc__)
|
||||
#undef JucePlugin_Build_AAX
|
||||
#define JucePlugin_Build_AAX 0
|
||||
#endif
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
This file is part of the JUCE library.
|
||||
Copyright (c) 2013 - Raw Material Software Ltd.
|
||||
|
||||
Permission is granted to use this software under the terms of either:
|
||||
a) the GPL v2 (or any later version)
|
||||
b) the Affero GPL v3
|
||||
|
||||
Details of these licenses can be found at: www.gnu.org/licenses
|
||||
|
||||
JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
To release a closed-source product which uses JUCE, commercial licenses are
|
||||
available: visit www.juce.com for more information.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
#ifndef JUCE_FAKEMOUSEMOVEGENERATOR_H_INCLUDED
|
||||
#define JUCE_FAKEMOUSEMOVEGENERATOR_H_INCLUDED
|
||||
|
||||
#if JUCE_MAC && JUCE_SUPPORT_CARBON
|
||||
|
||||
//==============================================================================
|
||||
// Helper class to workaround carbon windows not getting mouse-moves..
|
||||
class FakeMouseMoveGenerator : private Timer
|
||||
{
|
||||
public:
|
||||
FakeMouseMoveGenerator()
|
||||
{
|
||||
startTimer (1000 / 30);
|
||||
}
|
||||
|
||||
void timerCallback() override
|
||||
{
|
||||
// workaround for carbon windows not getting mouse-moves..
|
||||
const Point<float> screenPos (Desktop::getInstance().getMainMouseSource().getScreenPosition());
|
||||
|
||||
if (screenPos != lastScreenPos)
|
||||
{
|
||||
lastScreenPos = screenPos;
|
||||
const ModifierKeys mods (ModifierKeys::getCurrentModifiers());
|
||||
|
||||
if (! mods.isAnyMouseButtonDown())
|
||||
if (Component* const comp = Desktop::getInstance().findComponentAt (screenPos.roundToInt()))
|
||||
if (ComponentPeer* const peer = comp->getPeer())
|
||||
if (! peer->isFocused())
|
||||
peer->handleMouseEvent (0, peer->globalToLocal (screenPos), mods, Time::currentTimeMillis());
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
Point<float> lastScreenPos;
|
||||
};
|
||||
|
||||
#else
|
||||
struct FakeMouseMoveGenerator {};
|
||||
#endif
|
||||
|
||||
#endif // JUCE_FAKEMOUSEMOVEGENERATOR_H_INCLUDED
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
This file is part of the JUCE library.
|
||||
Copyright (c) 2013 - Raw Material Software Ltd.
|
||||
|
||||
Permission is granted to use this software under the terms of either:
|
||||
a) the GPL v2 (or any later version)
|
||||
b) the Affero GPL v3
|
||||
|
||||
Details of these licenses can be found at: www.gnu.org/licenses
|
||||
|
||||
JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
To release a closed-source product which uses JUCE, commercial licenses are
|
||||
available: visit www.juce.com for more information.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
#include "../juce_audio_plugin_client.h"
|
||||
|
||||
using namespace juce;
|
||||
|
||||
namespace juce
|
||||
{
|
||||
#if JUCE_MAC && ! DOXYGEN
|
||||
#define Point juce::Point
|
||||
#define Component juce::Component
|
||||
|
||||
void repostCurrentNSEvent();
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
inline const PluginHostType& getHostType()
|
||||
{
|
||||
static PluginHostType hostType;
|
||||
return hostType;
|
||||
}
|
||||
}
|
||||
|
||||
extern AudioProcessor* JUCE_CALLTYPE createPluginFilterOfType (AudioProcessor::WrapperType);
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
This file is part of the JUCE library.
|
||||
Copyright (c) 2013 - Raw Material Software Ltd.
|
||||
|
||||
Permission is granted to use this software under the terms of either:
|
||||
a) the GPL v2 (or any later version)
|
||||
b) the Affero GPL v3
|
||||
|
||||
Details of these licenses can be found at: www.gnu.org/licenses
|
||||
|
||||
JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
To release a closed-source product which uses JUCE, commercial licenses are
|
||||
available: visit www.juce.com for more information.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
#if JUCE_WINDOWS
|
||||
#undef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x500
|
||||
#undef STRICT
|
||||
#define STRICT 1
|
||||
#include <windows.h>
|
||||
#include <float.h>
|
||||
#pragma warning (disable : 4312 4355)
|
||||
#ifdef __INTEL_COMPILER
|
||||
#pragma warning (disable : 1899)
|
||||
#endif
|
||||
|
||||
#elif JUCE_LINUX
|
||||
#include <float.h>
|
||||
#include <sys/time.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/Xatom.h>
|
||||
#undef Font
|
||||
#undef KeyPress
|
||||
#undef Drawable
|
||||
#undef Time
|
||||
|
||||
#else
|
||||
#if ! (defined (JUCE_SUPPORT_CARBON) || defined (__LP64__))
|
||||
#define JUCE_SUPPORT_CARBON 1
|
||||
#endif
|
||||
|
||||
#if JUCE_SUPPORT_CARBON
|
||||
#define Point CarbonDummyPointName
|
||||
#define Component CarbonDummyCompName
|
||||
#include <Cocoa/Cocoa.h>
|
||||
#include <Carbon/Carbon.h>
|
||||
#undef Point
|
||||
#undef Component
|
||||
#else
|
||||
#include <Cocoa/Cocoa.h>
|
||||
#endif
|
||||
#include <objc/runtime.h>
|
||||
#include <objc/objc.h>
|
||||
#include <objc/message.h>
|
||||
#endif
|
||||
@@ -0,0 +1,237 @@
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
This file is part of the JUCE library.
|
||||
Copyright (c) 2013 - Raw Material Software Ltd.
|
||||
|
||||
Permission is granted to use this software under the terms of either:
|
||||
a) the GPL v2 (or any later version)
|
||||
b) the Affero GPL v3
|
||||
|
||||
Details of these licenses can be found at: www.gnu.org/licenses
|
||||
|
||||
JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
To release a closed-source product which uses JUCE, commercial licenses are
|
||||
available: visit www.juce.com for more information.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
//==============================================================================
|
||||
class PluginHostType
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
PluginHostType() : type (getHostType()) {}
|
||||
PluginHostType (const PluginHostType& other) noexcept : type (other.type) {}
|
||||
PluginHostType& operator= (const PluginHostType& other) noexcept { type = other.type; return *this; }
|
||||
|
||||
//==============================================================================
|
||||
enum HostType
|
||||
{
|
||||
UnknownHost,
|
||||
AbletonLive6,
|
||||
AbletonLive7,
|
||||
AbletonLive8,
|
||||
AbletonLiveGeneric,
|
||||
AdobeAudition,
|
||||
AdobePremierePro,
|
||||
AppleLogic,
|
||||
Ardour,
|
||||
CakewalkSonar8,
|
||||
CakewalkSonarGeneric,
|
||||
DigidesignProTools,
|
||||
DigitalPerformer,
|
||||
FruityLoops,
|
||||
MagixSamplitude,
|
||||
MergingPyramix,
|
||||
MuseReceptorGeneric,
|
||||
Reaper,
|
||||
SteinbergCubase4,
|
||||
SteinbergCubase5,
|
||||
SteinbergCubase5Bridged,
|
||||
SteinbergCubase6,
|
||||
SteinbergCubase7,
|
||||
SteinbergCubaseGeneric,
|
||||
SteinbergNuendo3,
|
||||
SteinbergNuendo4,
|
||||
SteinbergNuendo5,
|
||||
SteinbergNuendoGeneric,
|
||||
SteinbergWavelab5,
|
||||
SteinbergWavelab6,
|
||||
SteinbergWavelab7,
|
||||
SteinbergWavelab8,
|
||||
SteinbergWavelabGeneric,
|
||||
SteinbergTestHost,
|
||||
StudioOne,
|
||||
Tracktion3,
|
||||
TracktionGeneric,
|
||||
WaveBurner,
|
||||
VBVSTScanner
|
||||
};
|
||||
|
||||
HostType type;
|
||||
|
||||
//==============================================================================
|
||||
bool isAbletonLive() const noexcept { return type == AbletonLive6 || type == AbletonLive7 || type == AbletonLive8 || type == AbletonLiveGeneric; }
|
||||
bool isAdobeAudition() const noexcept { return type == AdobeAudition; }
|
||||
bool isArdour() const noexcept { return type == Ardour; }
|
||||
bool isDigitalPerformer() const noexcept { return type == DigitalPerformer; }
|
||||
bool isCubase() const noexcept { return type == SteinbergCubase4 || type == SteinbergCubase5 || type == SteinbergCubase5Bridged || type == SteinbergCubase6 || type == SteinbergCubase7 || type == SteinbergCubaseGeneric; }
|
||||
bool isCubaseBridged() const noexcept { return type == SteinbergCubase5Bridged; }
|
||||
bool isLogic() const noexcept { return type == AppleLogic; }
|
||||
bool isFruityLoops() const noexcept { return type == FruityLoops; }
|
||||
bool isNuendo() const noexcept { return type == SteinbergNuendo3 || type == SteinbergNuendo4 || type == SteinbergNuendo5 || type == SteinbergNuendoGeneric; }
|
||||
bool isPremiere() const noexcept { return type == AdobePremierePro; }
|
||||
bool isPyramix() const noexcept { return type == MergingPyramix; }
|
||||
bool isReceptor() const noexcept { return type == MuseReceptorGeneric; }
|
||||
bool isReaper() const noexcept { return type == Reaper; }
|
||||
bool isSamplitude() const noexcept { return type == MagixSamplitude; }
|
||||
bool isSonar() const noexcept { return type == CakewalkSonar8 || type == CakewalkSonarGeneric; }
|
||||
bool isSteinbergTestHost() const noexcept{ return type == SteinbergTestHost; }
|
||||
bool isSteinberg() const noexcept { return isCubase() || isNuendo() || isWavelab() || isSteinbergTestHost(); }
|
||||
bool isStudioOne() const noexcept { return type == StudioOne; }
|
||||
bool isTracktion() const noexcept { return type == Tracktion3 || type == TracktionGeneric; }
|
||||
bool isVBVSTScanner() const noexcept { return type == VBVSTScanner; }
|
||||
bool isWaveBurner() const noexcept { return type == WaveBurner; }
|
||||
bool isWavelab() const noexcept { return isWavelabLegacy() || type == SteinbergWavelab7 || type == SteinbergWavelab8 || type == SteinbergWavelabGeneric; }
|
||||
bool isWavelabLegacy() const noexcept { return type == SteinbergWavelab5 || type == SteinbergWavelab6; }
|
||||
|
||||
//==============================================================================
|
||||
const char* getHostDescription() const noexcept
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case AbletonLive6: return "Ableton Live 6";
|
||||
case AbletonLive7: return "Ableton Live 7";
|
||||
case AbletonLive8: return "Ableton Live 8";
|
||||
case AbletonLiveGeneric: return "Ableton Live";
|
||||
case AdobeAudition: return "Adobe Audition";
|
||||
case AdobePremierePro: return "Adobe Premiere";
|
||||
case AppleLogic: return "Apple Logic";
|
||||
case CakewalkSonar8: return "Cakewalk Sonar 8";
|
||||
case CakewalkSonarGeneric: return "Cakewalk Sonar";
|
||||
case DigidesignProTools: return "ProTools";
|
||||
case DigitalPerformer: return "DigitalPerformer";
|
||||
case FruityLoops: return "FruityLoops";
|
||||
case MagixSamplitude: return "Magix Samplitude";
|
||||
case MergingPyramix: return "Pyramix";
|
||||
case MuseReceptorGeneric: return "Muse Receptor";
|
||||
case Reaper: return "Reaper";
|
||||
case SteinbergCubase4: return "Steinberg Cubase 4";
|
||||
case SteinbergCubase5: return "Steinberg Cubase 5";
|
||||
case SteinbergCubase5Bridged: return "Steinberg Cubase 5 Bridged";
|
||||
case SteinbergCubase6: return "Steinberg Cubase 6";
|
||||
case SteinbergCubase7: return "Steinberg Cubase 7";
|
||||
case SteinbergCubaseGeneric: return "Steinberg Cubase";
|
||||
case SteinbergNuendo3: return "Steinberg Nuendo 3";
|
||||
case SteinbergNuendo4: return "Steinberg Nuendo 4";
|
||||
case SteinbergNuendo5: return "Steinberg Nuendo 5";
|
||||
case SteinbergNuendoGeneric: return "Steinberg Nuendo";
|
||||
case SteinbergWavelab5: return "Steinberg Wavelab 5";
|
||||
case SteinbergWavelab6: return "Steinberg Wavelab 6";
|
||||
case SteinbergWavelab7: return "Steinberg Wavelab 7";
|
||||
case SteinbergWavelab8: return "Steinberg Wavelab 8";
|
||||
case SteinbergWavelabGeneric: return "Steinberg Wavelab";
|
||||
case SteinbergTestHost: return "Steinberg TestHost";
|
||||
case StudioOne: return "Studio One";
|
||||
case Tracktion3: return "Tracktion 3";
|
||||
case TracktionGeneric: return "Tracktion";
|
||||
case VBVSTScanner: return "VBVSTScanner";
|
||||
case WaveBurner: return "WaveBurner";
|
||||
default: break;
|
||||
}
|
||||
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
static String getHostPath()
|
||||
{
|
||||
return File::getSpecialLocation (File::hostApplicationPath).getFullPathName();
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
private:
|
||||
static HostType getHostType()
|
||||
{
|
||||
const String hostPath (getHostPath());
|
||||
const String hostFilename (File (hostPath).getFileName());
|
||||
|
||||
#if JUCE_MAC
|
||||
if (hostPath.containsIgnoreCase ("Live 6.")) return AbletonLive6;
|
||||
if (hostPath.containsIgnoreCase ("Live 7.")) return AbletonLive7;
|
||||
if (hostPath.containsIgnoreCase ("Live 8.")) return AbletonLive8;
|
||||
if (hostFilename.containsIgnoreCase ("Live")) return AbletonLiveGeneric;
|
||||
if (hostFilename.containsIgnoreCase ("Adobe Premiere")) return AdobePremierePro;
|
||||
if (hostFilename.contains ("Logic")) return AppleLogic;
|
||||
if (hostFilename.containsIgnoreCase ("Pro Tools")) return DigidesignProTools;
|
||||
if (hostFilename.containsIgnoreCase ("Nuendo 3")) return SteinbergNuendo3;
|
||||
if (hostFilename.containsIgnoreCase ("Nuendo 4")) return SteinbergNuendo4;
|
||||
if (hostFilename.containsIgnoreCase ("Nuendo 5")) return SteinbergNuendo5;
|
||||
if (hostFilename.containsIgnoreCase ("Nuendo")) return SteinbergNuendoGeneric;
|
||||
if (hostFilename.containsIgnoreCase ("Cubase 4")) return SteinbergCubase4;
|
||||
if (hostFilename.containsIgnoreCase ("Cubase 5")) return SteinbergCubase5;
|
||||
if (hostFilename.containsIgnoreCase ("Cubase 6")) return SteinbergCubase6;
|
||||
if (hostFilename.containsIgnoreCase ("Cubase 7")) return SteinbergCubase7;
|
||||
if (hostFilename.containsIgnoreCase ("Cubase")) return SteinbergCubaseGeneric;
|
||||
if (hostPath.containsIgnoreCase ("Wavelab 7")) return SteinbergWavelab7;
|
||||
if (hostPath.containsIgnoreCase ("Wavelab 8")) return SteinbergWavelab8;
|
||||
if (hostFilename.containsIgnoreCase ("Wavelab")) return SteinbergWavelabGeneric;
|
||||
if (hostFilename.containsIgnoreCase ("WaveBurner")) return WaveBurner;
|
||||
if (hostFilename.contains ("Digital Performer")) return DigitalPerformer;
|
||||
if (hostFilename.containsIgnoreCase ("reaper")) return Reaper;
|
||||
if (hostPath.containsIgnoreCase ("Studio One")) return StudioOne;
|
||||
if (hostPath.containsIgnoreCase ("Tracktion 3")) return Tracktion3;
|
||||
if (hostFilename.containsIgnoreCase ("Tracktion")) return TracktionGeneric;
|
||||
|
||||
#elif JUCE_WINDOWS
|
||||
if (hostFilename.containsIgnoreCase ("Live 6.")) return AbletonLive6;
|
||||
if (hostFilename.containsIgnoreCase ("Live 7.")) return AbletonLive7;
|
||||
if (hostFilename.containsIgnoreCase ("Live 8.")) return AbletonLive8;
|
||||
if (hostFilename.containsIgnoreCase ("Live ")) return AbletonLiveGeneric;
|
||||
if (hostFilename.containsIgnoreCase ("Audition")) return AdobeAudition;
|
||||
if (hostFilename.containsIgnoreCase ("Adobe Premiere")) return AdobePremierePro;
|
||||
if (hostFilename.containsIgnoreCase ("ProTools")) return DigidesignProTools;
|
||||
if (hostPath.containsIgnoreCase ("SONAR 8")) return CakewalkSonar8;
|
||||
if (hostFilename.containsIgnoreCase ("SONAR")) return CakewalkSonarGeneric;
|
||||
if (hostFilename.containsIgnoreCase ("Logic")) return AppleLogic;
|
||||
if (hostPath.containsIgnoreCase ("Tracktion 3")) return Tracktion3;
|
||||
if (hostFilename.containsIgnoreCase ("Tracktion")) return TracktionGeneric;
|
||||
if (hostFilename.containsIgnoreCase ("reaper")) return Reaper;
|
||||
if (hostFilename.containsIgnoreCase ("Cubase4")) return SteinbergCubase4;
|
||||
if (hostFilename.containsIgnoreCase ("Cubase5")) return SteinbergCubase5;
|
||||
if (hostFilename.containsIgnoreCase ("Cubase6")) return SteinbergCubase6;
|
||||
if (hostFilename.containsIgnoreCase ("Cubase7")) return SteinbergCubase7;
|
||||
if (hostFilename.containsIgnoreCase ("Cubase")) return SteinbergCubaseGeneric;
|
||||
if (hostFilename.containsIgnoreCase ("VSTBridgeApp")) return SteinbergCubase5Bridged;
|
||||
if (hostPath.containsIgnoreCase ("Wavelab 5")) return SteinbergWavelab5;
|
||||
if (hostPath.containsIgnoreCase ("Wavelab 6")) return SteinbergWavelab6;
|
||||
if (hostPath.containsIgnoreCase ("Wavelab 7")) return SteinbergWavelab7;
|
||||
if (hostPath.containsIgnoreCase ("Wavelab 8")) return SteinbergWavelab8;
|
||||
if (hostPath.containsIgnoreCase ("Nuendo")) return SteinbergNuendoGeneric;
|
||||
if (hostFilename.containsIgnoreCase ("Wavelab")) return SteinbergWavelabGeneric;
|
||||
if (hostFilename.containsIgnoreCase ("TestHost")) return SteinbergTestHost;
|
||||
if (hostFilename.containsIgnoreCase ("rm-host")) return MuseReceptorGeneric;
|
||||
if (hostFilename.startsWith ("FL")) return FruityLoops;
|
||||
if (hostFilename.contains ("ilbridge.")) return FruityLoops;
|
||||
if (hostPath.containsIgnoreCase ("Studio One")) return StudioOne;
|
||||
if (hostPath.containsIgnoreCase ("Digital Performer")) return DigitalPerformer;
|
||||
if (hostFilename.containsIgnoreCase ("VST_Scanner")) return VBVSTScanner;
|
||||
if (hostPath.containsIgnoreCase ("Merging Technologies")) return MergingPyramix;
|
||||
if (hostFilename.startsWithIgnoreCase ("Sam")) return MagixSamplitude;
|
||||
|
||||
#elif JUCE_LINUX
|
||||
if (hostFilename.containsIgnoreCase ("Ardour")) return Ardour;
|
||||
|
||||
#else
|
||||
#error
|
||||
#endif
|
||||
return UnknownHost;
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
This file is part of the JUCE library.
|
||||
Copyright (c) 2013 - Raw Material Software Ltd.
|
||||
|
||||
Permission is granted to use this software under the terms of either:
|
||||
a) the GPL v2 (or any later version)
|
||||
b) the Affero GPL v3
|
||||
|
||||
Details of these licenses can be found at: www.gnu.org/licenses
|
||||
|
||||
JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
To release a closed-source product which uses JUCE, commercial licenses are
|
||||
available: visit www.juce.com for more information.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
#if _MSC_VER || defined (__MINGW32__) || defined (__MINGW64__)
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
// Your project must contain an AppConfig.h file with your project-specific settings in it,
|
||||
// and your header search path must make it accessible to the module's files.
|
||||
#include "AppConfig.h"
|
||||
|
||||
#include "../utility/juce_CheckSettingMacros.h"
|
||||
#include "juce_IncludeModuleHeaders.h"
|
||||
|
||||
#if _MSC_VER || JUCE_MINGW
|
||||
|
||||
#if JucePlugin_Build_RTAS
|
||||
extern "C" BOOL WINAPI DllMainRTAS (HINSTANCE, DWORD, LPVOID);
|
||||
#endif
|
||||
|
||||
extern "C" BOOL WINAPI DllMain (HINSTANCE instance, DWORD reason, LPVOID reserved)
|
||||
{
|
||||
if (reason == DLL_PROCESS_ATTACH)
|
||||
Process::setCurrentModuleInstanceHandle (instance);
|
||||
|
||||
#if JucePlugin_Build_RTAS
|
||||
if (GetModuleHandleA ("DAE.DLL") != 0)
|
||||
{
|
||||
#if JucePlugin_Build_AAX
|
||||
if (! File::getSpecialLocation (File::currentExecutableFile).hasFileExtension ("aaxplugin"))
|
||||
#endif
|
||||
return DllMainRTAS (instance, reason, reserved);
|
||||
}
|
||||
#endif
|
||||
|
||||
(void) reserved;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
/** Somewhere in the codebase of your plugin, you need to implement this function
|
||||
and make it return a new instance of the filter subclass that you're building.
|
||||
*/
|
||||
extern AudioProcessor* JUCE_CALLTYPE createPluginFilter();
|
||||
|
||||
AudioProcessor* JUCE_CALLTYPE createPluginFilterOfType (AudioProcessor::WrapperType type)
|
||||
{
|
||||
AudioProcessor::setTypeOfNextNewPlugin (type);
|
||||
AudioProcessor* const pluginInstance = createPluginFilter();
|
||||
AudioProcessor::setTypeOfNextNewPlugin (AudioProcessor::wrapperType_Undefined);
|
||||
|
||||
// your createPluginFilter() method must return an object!
|
||||
jassert (pluginInstance != nullptr && pluginInstance->wrapperType == type);
|
||||
|
||||
return pluginInstance;
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
This file is part of the JUCE library.
|
||||
Copyright (c) 2013 - Raw Material Software Ltd.
|
||||
|
||||
Permission is granted to use this software under the terms of either:
|
||||
a) the GPL v2 (or any later version)
|
||||
b) the Affero GPL v3
|
||||
|
||||
Details of these licenses can be found at: www.gnu.org/licenses
|
||||
|
||||
JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
To release a closed-source product which uses JUCE, commercial licenses are
|
||||
available: visit www.juce.com for more information.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
#if JUCE_WINDOWS
|
||||
|
||||
namespace juce
|
||||
{
|
||||
// This function is in juce_win32_Windowing.cpp
|
||||
extern bool offerKeyMessageToJUCEWindow (MSG&);
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
static HHOOK mouseWheelHook = 0, keyboardHook = 0;
|
||||
static int numHookUsers = 0;
|
||||
|
||||
struct WindowsHooks
|
||||
{
|
||||
WindowsHooks()
|
||||
{
|
||||
if (numHookUsers++ == 0)
|
||||
{
|
||||
mouseWheelHook = SetWindowsHookEx (WH_MOUSE, mouseWheelHookCallback,
|
||||
(HINSTANCE) Process::getCurrentModuleInstanceHandle(),
|
||||
GetCurrentThreadId());
|
||||
|
||||
keyboardHook = SetWindowsHookEx (WH_GETMESSAGE, keyboardHookCallback,
|
||||
(HINSTANCE) Process::getCurrentModuleInstanceHandle(),
|
||||
GetCurrentThreadId());
|
||||
}
|
||||
}
|
||||
|
||||
~WindowsHooks()
|
||||
{
|
||||
if (--numHookUsers == 0)
|
||||
{
|
||||
if (mouseWheelHook != 0)
|
||||
{
|
||||
UnhookWindowsHookEx (mouseWheelHook);
|
||||
mouseWheelHook = 0;
|
||||
}
|
||||
|
||||
if (keyboardHook != 0)
|
||||
{
|
||||
UnhookWindowsHookEx (keyboardHook);
|
||||
keyboardHook = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static LRESULT CALLBACK mouseWheelHookCallback (int nCode, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
if (nCode >= 0 && wParam == WM_MOUSEWHEEL)
|
||||
{
|
||||
// using a local copy of this struct to support old mingw libraries
|
||||
struct MOUSEHOOKSTRUCTEX_ : public MOUSEHOOKSTRUCT { DWORD mouseData; };
|
||||
|
||||
const MOUSEHOOKSTRUCTEX_& hs = *(MOUSEHOOKSTRUCTEX_*) lParam;
|
||||
|
||||
if (Component* const comp = Desktop::getInstance().findComponentAt (Point<int> (hs.pt.x, hs.pt.y)))
|
||||
if (comp->getWindowHandle() != 0)
|
||||
return PostMessage ((HWND) comp->getWindowHandle(), WM_MOUSEWHEEL,
|
||||
hs.mouseData & 0xffff0000, (hs.pt.x & 0xffff) | (hs.pt.y << 16));
|
||||
}
|
||||
|
||||
return CallNextHookEx (mouseWheelHook, nCode, wParam, lParam);
|
||||
}
|
||||
|
||||
static LRESULT CALLBACK keyboardHookCallback (int nCode, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
MSG& msg = *(MSG*) lParam;
|
||||
|
||||
if (nCode == HC_ACTION && wParam == PM_REMOVE
|
||||
&& offerKeyMessageToJUCEWindow (msg))
|
||||
{
|
||||
zerostruct (msg);
|
||||
msg.message = WM_USER;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return CallNextHookEx (keyboardHook, nCode, wParam, lParam);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user