mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Use our own export macro
This commit is contained in:
@@ -21,6 +21,8 @@
|
||||
#include <sys/resource.h>
|
||||
#include <ghc/filesystem.hpp>
|
||||
|
||||
#define YABRIDGE_EXPORT __attribute__((visibility("default")))
|
||||
|
||||
/**
|
||||
* The interval in seconds between synchronizing the Wine plugin host's audio
|
||||
* thread scheduling priority with the host's audio thread.
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
|
||||
using namespace std::literals::string_literals;
|
||||
|
||||
#define VST_EXPORT __attribute__((visibility("default")))
|
||||
|
||||
// The main entry point for VST2 plugins should be called `VSTPluginMain``. The
|
||||
// other one exist for legacy reasons since some old hosts might still use them
|
||||
// (EnergyXT being the only known host on Linux that uses the `main` entry
|
||||
@@ -40,7 +38,7 @@ using namespace std::literals::string_literals;
|
||||
* manual memory management. Clean up is done when we receive the `effClose`
|
||||
* opcode from the VST2 host (i.e. opcode 1).`
|
||||
*/
|
||||
extern "C" VST_EXPORT AEffect* VSTPluginMain(
|
||||
extern "C" YABRIDGE_EXPORT AEffect* VSTPluginMain(
|
||||
audioMasterCallback host_callback) {
|
||||
try {
|
||||
// This is the only place where we have to use manual memory management.
|
||||
@@ -73,8 +71,8 @@ extern "C" VST_EXPORT AEffect* VSTPluginMain(
|
||||
// XXX: GCC doens't seem to have a clean way to let you define an arbitrary
|
||||
// function called 'main'. Even JUCE does it this way, so it should be
|
||||
// safe.
|
||||
extern "C" VST_EXPORT AEffect* deprecated_main(
|
||||
extern "C" YABRIDGE_EXPORT AEffect* deprecated_main(
|
||||
audioMasterCallback audioMaster) asm("main");
|
||||
VST_EXPORT AEffect* deprecated_main(audioMasterCallback audioMaster) {
|
||||
YABRIDGE_EXPORT AEffect* deprecated_main(audioMasterCallback audioMaster) {
|
||||
return VSTPluginMain(audioMaster);
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ bool DeinitModule() {
|
||||
* the plugin in our Wine application, retrieve its information and supported
|
||||
* classes, and then recreate it here.
|
||||
*/
|
||||
SMTG_EXPORT_SYMBOL Steinberg::IPluginFactory* PLUGIN_API GetPluginFactory() {
|
||||
YABRIDGE_EXPORT Steinberg::IPluginFactory* PLUGIN_API GetPluginFactory() {
|
||||
// The host should have called `InitModule()` first
|
||||
assert(bridge);
|
||||
|
||||
|
||||
@@ -41,9 +41,9 @@ static const std::string host_name = "yabridge group host version " +
|
||||
* plugin host and this group plugin host will function identically on both the
|
||||
* plugin and the Wine VST host side.
|
||||
*/
|
||||
int __attribute__((visibility("default")))
|
||||
int YABRIDGE_EXPORT
|
||||
#ifdef WINE_USE_CDECL
|
||||
__cdecl
|
||||
__cdecl
|
||||
#endif
|
||||
main(int argc, char* argv[]) {
|
||||
// Instead of directly hosting a plugin, this process will receive a UNIX
|
||||
|
||||
@@ -39,9 +39,9 @@ static const std::string host_name = "yabridge host version " +
|
||||
* plugin plugin, and then connect back to the `libyabridge-{vst2,vst3}.so`
|
||||
* instance that spawned this over the socket.
|
||||
*/
|
||||
int __attribute__((visibility("default")))
|
||||
int YABRIDGE_EXPORT
|
||||
#ifdef WINE_USE_CDECL
|
||||
__cdecl
|
||||
__cdecl
|
||||
#endif
|
||||
main(int argc, char* argv[]) {
|
||||
// We pass the plugin format, the name of the VST2 plugin .dll file or VST3
|
||||
|
||||
Reference in New Issue
Block a user