mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Completely run effEditIdle from a timer
Although it hasn't shown up, this will get rid of the possibility of off-thread effEditIdle calls causing issues. And since we need some way to run call this function while the event loop is running anyways, doing it entirely from a timer similar to how hosts on Windows would do it seems like the best solution.
This commit is contained in:
@@ -398,6 +398,20 @@ intptr_t Vst2PluginBridge::dispatch(AEffect* /*plugin*/,
|
||||
|
||||
return return_value;
|
||||
}; break;
|
||||
case effEditIdle: {
|
||||
// This is the only place where we'll deviate from yabridge's
|
||||
// 'one-to-one passthrough' philosophy. While in practice we can
|
||||
// just pass through `effEditIdle` and we have been doing so until
|
||||
// yabridge 3.x, in reality it's much more practical to just run
|
||||
// this on a Win32 timer. We would either need to run `effEditIdle`
|
||||
// from a non-GUI thread (which could cause issues), or we would
|
||||
// need a timer anyways to proc the function when the GUI is being
|
||||
// blocked by for instance an open dropdown.
|
||||
logger.log_event(true, opcode, index, value, nullptr, option,
|
||||
std::nullopt);
|
||||
logger.log_event_response(true, opcode, 0, nullptr, std::nullopt);
|
||||
return 0;
|
||||
}; break;
|
||||
case effCanDo: {
|
||||
const std::string query(static_cast<const char*>(data));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user