mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +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:
@@ -23,6 +23,9 @@ Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
Linux plugin hosts. This should not be necessary in any normal situation since
|
||||
Desktop Linux has been 64-bit only for a while now, but it could be useful in
|
||||
some very specific situations.
|
||||
- Defined the deprecated pre-VST2.4 `main` entry point for VST2 plugins. This
|
||||
allows the above mentioned 32-bit version of yabridge to be used in EnergyXT,
|
||||
allowing you to use both 32-bit and 64-bit Windows VST2 plugins there.
|
||||
|
||||
### Changed
|
||||
|
||||
|
||||
@@ -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