fixed non-mac issues
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include "vsthost.h"
|
||||
|
||||
#if (defined(_WIN32) || defined(__APPLE__)) && !defined(NOVST)
|
||||
#ifndef NOVST
|
||||
|
||||
// adapted from http://teragonaudio.com/article/How-to-make-your-own-VST-host.html
|
||||
|
||||
@@ -39,12 +39,12 @@ extern "C" {
|
||||
break;
|
||||
case audioMasterGetCurrentProcessLevel:
|
||||
return 0;
|
||||
// Handle other opcodes here... there will be lots of them
|
||||
// modulePtr other opcodes here... there will be lots of them
|
||||
case audioMasterEndEdit: // change made
|
||||
mainWindow->setWindowModified(true);
|
||||
break;
|
||||
default:
|
||||
qInfo() << "Plugin requested unhandled opcode" << opcode;
|
||||
qInfo() << "Plugin requested unmodulePtrd opcode" << opcode;
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
@@ -92,8 +92,8 @@ void VSTHost::loadPlugin() {
|
||||
return;
|
||||
}
|
||||
#else
|
||||
handle = LibLoad(dll_fn);
|
||||
if(handle == nullptr) {
|
||||
modulePtr = LibLoad(dll_fn);
|
||||
if(modulePtr == nullptr) {
|
||||
QString dll_error;
|
||||
|
||||
#ifdef _WIN32
|
||||
@@ -151,7 +151,7 @@ bool VSTHost::configurePluginCallbacks() {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Create dispatcher handle
|
||||
// Create dispatcher modulePtr
|
||||
dispatcher = reinterpret_cast<dispatcherFuncPtr>(plugin->dispatcher);
|
||||
|
||||
// Set up plugin callback functions
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef VSTHOSTWIN_H
|
||||
#define VSTHOSTWIN_H
|
||||
|
||||
#if (defined(_WIN32) || defined(__APPLE__)) && !defined(NOVST)
|
||||
#ifndef NOVST
|
||||
|
||||
#include "project/effect.h"
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ QStringList LibFilter() {
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
CFBundleRef BundleLoad(const QString &filename) {
|
||||
CFStringRef bundle_str = CFStringCreateWithCString(NULL, filename.toUtf8(), kCFStringEncodingUTF8);
|
||||
CFURLRef bundle_url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, bundle_str, kCFURLPOSIXPathStyle, true);
|
||||
@@ -40,3 +41,4 @@ void BundleClose(CFBundleRef bundle) {
|
||||
CFBundleUnloadExecutable(bundle);
|
||||
CFRelease(bundle);
|
||||
}
|
||||
#endif
|
||||
|
||||
+2
-2
@@ -28,7 +28,7 @@
|
||||
#include "effects/internal/paneffect.h"
|
||||
#include "effects/internal/shakeeffect.h"
|
||||
#include "effects/internal/cornerpineffect.h"
|
||||
#if defined(_WIN32) || defined(__APPLE__)
|
||||
#ifndef NOVST
|
||||
#include "effects/internal/vsthost.h"
|
||||
#endif
|
||||
#include "effects/internal/fillleftrighteffect.h"
|
||||
@@ -64,7 +64,7 @@ Effect* create_effect(Clip* c, const EffectMeta* em) {
|
||||
case EFFECT_INTERNAL_SHAKE: return new ShakeEffect(c, em);
|
||||
case EFFECT_INTERNAL_CORNERPIN: return new CornerPinEffect(c, em);
|
||||
case EFFECT_INTERNAL_FILLLEFTRIGHT: return new FillLeftRightEffect(c, em);
|
||||
#if (defined(_WIN32) || defined(__APPLE__)) && !defined(NOVST)
|
||||
#ifndef NOVST
|
||||
case EFFECT_INTERNAL_VST: return new VSTHost(c, em);
|
||||
#endif
|
||||
#ifndef NOFREI0R
|
||||
|
||||
@@ -34,7 +34,7 @@ void load_internal_effects() {
|
||||
em.internal = EFFECT_INTERNAL_PAN;
|
||||
effects.append(em);
|
||||
|
||||
#if (defined(_WIN32) || defined(__APPLE__)) && !defined(NOVST)
|
||||
#ifndef NOVST
|
||||
em.name = "VST Plugin 2.x";
|
||||
em.internal = EFFECT_INTERNAL_VST;
|
||||
effects.append(em);
|
||||
|
||||
Reference in New Issue
Block a user