mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-06 19:40:10 +02:00
Print exceptions thrown during initialization
This commit is contained in:
+20
-13
@@ -46,23 +46,30 @@ Bridge& get_bridge_instance(const AEffect& plugin) {
|
|||||||
* opcode from the VST host (i.e. opcode 1).`
|
* opcode from the VST host (i.e. opcode 1).`
|
||||||
*/
|
*/
|
||||||
VST_EXPORT AEffect* VSTPluginMain(audioMasterCallback /*audioMaster*/) {
|
VST_EXPORT AEffect* VSTPluginMain(audioMasterCallback /*audioMaster*/) {
|
||||||
Bridge* bridge = new Bridge();
|
try {
|
||||||
|
Bridge* bridge = new Bridge();
|
||||||
|
|
||||||
AEffect* plugin = new AEffect();
|
AEffect* plugin = new AEffect();
|
||||||
plugin->ptr3 = bridge;
|
plugin->ptr3 = bridge;
|
||||||
|
|
||||||
plugin->dispatcher = dispatch;
|
plugin->dispatcher = dispatch;
|
||||||
plugin->process = process;
|
plugin->process = process;
|
||||||
plugin->setParameter = setParameter;
|
plugin->setParameter = setParameter;
|
||||||
plugin->getParameter = getParameter;
|
plugin->getParameter = getParameter;
|
||||||
// // XXX: processReplacing?
|
// // XXX: processReplacing?
|
||||||
|
|
||||||
// TODO: Add more and actual data
|
// TODO: Add more and actual data
|
||||||
plugin->magic = kEffectMagic;
|
plugin->magic = kEffectMagic;
|
||||||
plugin->numParams = 69;
|
plugin->numParams = 69;
|
||||||
plugin->uniqueID = 69420;
|
plugin->uniqueID = 69420;
|
||||||
|
|
||||||
return plugin;
|
return plugin;
|
||||||
|
} catch (const std::exception& error) {
|
||||||
|
std::cerr << "Error during initialization:" << std::endl;
|
||||||
|
std::cerr << error.what() << std::endl;
|
||||||
|
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// The below functions are proxy functions for the methods defined in
|
// The below functions are proxy functions for the methods defined in
|
||||||
|
|||||||
Reference in New Issue
Block a user