mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-08 04:20:13 +02:00
Define the deprecated VST<2.4 main entry point
This should allow @AVLinux to use yabridge under EnergyXT.
This commit is contained in:
@@ -25,10 +25,9 @@
|
||||
#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.
|
||||
// There's also another possible legacy entry point just called `main`, but GCC
|
||||
// will refuse to compile a function called `main` that's not a regular C++ main
|
||||
// function.
|
||||
// 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
|
||||
// point).
|
||||
|
||||
/**
|
||||
* The main VST2 plugin entry point. We first set up a bridge that connects to a
|
||||
@@ -61,6 +60,11 @@ extern "C" VST_EXPORT AEffect* VSTPluginMain(
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" VST_EXPORT AEffect* main_plugin(audioMasterCallback audioMaster) {
|
||||
// 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(
|
||||
audioMasterCallback audioMaster) asm("main");
|
||||
VST_EXPORT AEffect* deprecated_main(audioMasterCallback audioMaster) {
|
||||
return VSTPluginMain(audioMaster);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user