Enable mutual recursion on effGetProgramName()

PG-8X in REAPER has the same mutual recursion limitation the Voxengo
plugins had in Renoise, but with `effGetProgramName()` instead of
`effGetProgram()`.
This commit is contained in:
Robbert van der Helm
2021-05-23 19:00:16 +02:00
parent ac4957a29b
commit d610c07e11
2 changed files with 6 additions and 1 deletions
+5 -1
View File
@@ -46,6 +46,9 @@ Vst2Bridge* current_bridge_instance = nullptr;
* recursive mutexes on both functions so `effGetProgram()` _has_ to be
* called on the same thread that is currently calling
* `audioMasterUpdateDisplay()`.
* NOTE: Similarly, REAPER calls `effProgramName()` in response to
* `audioMasterUpdateDisplay()`, and PG-8X also requires that to be called
* from the same thread that called `audioMasterUpdateDisplay()`.
*/
static const std::set<int> mutually_recursive_callbacks{
audioMasterUpdateDisplay};
@@ -61,7 +64,8 @@ static const std::set<int> mutually_recursive_callbacks{
* just execute the function directly on the calling thread. See above for a
* list of situations where this may be necessary.
*/
static const std::set<int> safe_mutually_recursive_requests{effGetProgram};
static const std::set<int> safe_mutually_recursive_requests{effGetProgram,
effGetProgramName};
/**
* Opcodes that should always be handled on the main thread because they may