diff --git a/CMakeLists.txt b/CMakeLists.txt index ef4ebed..c3bd5e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ project(${PROJECT_NAME}) # Project version set(VERSION_MAJOR 1) set(VERSION_MINOR 1) -set(VERSION_PATCH 0) +set(VERSION_PATCH 1) # Set plugin shared library base name set(PLUGIN_BASENAME ${PROJECT_NAME}-plugin) diff --git a/README.md b/README.md index 64b6a30..8a3bf14 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ The following list is not complete. It contains only plugins, that have been tes VST-Plugins | works? | Notes | ------------:|:----------:|:-------| - AlgoMusic CZythia | yes | + AlgoMusic CZynthia | yes | Aly James LAB OB-Xtreme | yes | Blue Cat Audio Oscilloscope Multi | no | doesn't work with wine Credland Audio BigKick | no | doesn't work with wine @@ -106,6 +106,7 @@ The following list is not complete. It contains only plugins, that have been tes Smartelectronix s(M)exoscope | yes | SQ8L by Siegfried Kullmann | yes | SuperWave P8 | yes | + Synapse Audio DUNE 2 | yes | Synth1 by Ichiro Toda | yes | Tone2 FireBird | yes | Tone2 Nemesis | yes | diff --git a/src/plugin/plugin.cpp b/src/plugin/plugin.cpp index e1ee79f..042d847 100644 --- a/src/plugin/plugin.cpp +++ b/src/plugin/plugin.cpp @@ -234,15 +234,8 @@ intptr_t Plugin::handleAudioMaster() intptr_t Plugin::dispatch(DataPort* port, i32 opcode, i32 index, intptr_t value, void* ptr, float opt) { -// if(opcode != effCanBeAutomated && opcode != effGetProgramNameIndexed && -// opcode != effEditIdle && opcode != effGetParamDisplay && -// opcode != effGetParamLabel && opcode != effGetParameterProperties) { -// FLOOD("dispatch: %s", kDispatchEvents[opcode]); -// } - - if(opcode != effEditIdle && opcode) { + if(opcode != effEditIdle && opcode) FLOOD("(%p) dispatch: %s", std::this_thread::get_id(), kDispatchEvents[opcode]); - } DataFrame* frame = port->frame(); frame->command = Command::Dispatch; @@ -382,19 +375,16 @@ intptr_t Plugin::dispatch(DataPort* port, i32 opcode, i32 index, intptr_t value, port->waitResponse(); return frame->value; } - case effGetProgramName: + case effGetProgramName: { port->sendRequest(); port->waitResponse(); - if(frame->value) { - const char* source = reinterpret_cast(frame->data); - char* dest = static_cast(ptr); - - std::strncpy(dest, source, kVstMaxProgNameLen); - dest[kVstMaxProgNameLen-1] = '\0'; - } + const char* source = reinterpret_cast(frame->data); + char* dest = static_cast(ptr); - return frame->value; + std::strncpy(dest, source, kVstMaxProgNameLen); + dest[kVstMaxProgNameLen-1] = '\0'; + return frame->value; } case effSetProgramName: { const char* source = static_cast(ptr); @@ -408,49 +398,49 @@ intptr_t Plugin::dispatch(DataPort* port, i32 opcode, i32 index, intptr_t value, return frame->value; } case effGetVendorString: - case effGetProductString: + case effGetProductString: { port->sendRequest(); port->waitResponse(); - if(frame->value) { - const char* source = reinterpret_cast(frame->data); - char* dest = static_cast(ptr); - - std::strncpy(dest, source, kVstMaxVendorStrLen); - dest[kVstMaxVendorStrLen-1] = '\0'; - } + const char* source = reinterpret_cast(frame->data); + char* dest = static_cast(ptr); - return frame->value; + std::strncpy(dest, source, kVstMaxVendorStrLen); + dest[kVstMaxVendorStrLen-1] = '\0'; + return frame->value; } case effGetParamName: case effGetParamLabel: - case effGetParamDisplay: + case effGetParamDisplay: { port->sendRequest(); port->waitResponse(); - if(frame->value) { - const char* source = reinterpret_cast(frame->data); - char* dest = static_cast(ptr); + const char* source = reinterpret_cast(frame->data); + char* dest = static_cast(ptr); + +// std::strncpy(dest, source, kVstMaxParamStrLen); +// dest[kVstMaxParamStrLen-1] = '\0'; - std::strncpy(dest, source, kVstMaxParamStrLen); - dest[kVstMaxParamStrLen-1] = '\0'; + // Workaround for Variety of Sound plugins bug (non-printable characters) + int i; + for(i = 0; i < kVstMaxParamStrLen - 1; ++i) { + if(isprint(source[i])) + dest[i] = source[i]; } - return frame->value; + dest[i] = '\0'; + return frame->value; } - case effGetEffectName: + case effGetEffectName: { port->sendRequest(); port->waitResponse(); - if(frame->value) { - const char* source = reinterpret_cast(frame->data); - char* dest = static_cast(ptr); - - std::strncpy(dest, source, kVstMaxEffectNameLen); - dest[kVstMaxEffectNameLen-1] = '\0'; - } + const char* source = reinterpret_cast(frame->data); + char* dest = static_cast(ptr); - return frame->value; + std::strncpy(dest, source, kVstMaxEffectNameLen); + dest[kVstMaxEffectNameLen-1] = '\0'; + return frame->value; } case effGetParameterProperties: port->sendRequest(); @@ -467,19 +457,16 @@ intptr_t Plugin::dispatch(DataPort* port, i32 opcode, i32 index, intptr_t value, std::memcpy(ptr, frame->data, sizeof(VstPinProperties)); return frame->value; - case effGetProgramNameIndexed: + case effGetProgramNameIndexed: { port->sendRequest(); port->waitResponse(); - if(frame->value) { - const char* source = reinterpret_cast(frame->data); - char* dest = static_cast(ptr); + const char* source = reinterpret_cast(frame->data); + char* dest = static_cast(ptr); - std::strncpy(dest, source, kVstMaxProgNameLen); - dest[kVstMaxProgNameLen-1] = '\0'; - } - - return frame->value; + std::strncpy(dest, source, kVstMaxProgNameLen); + dest[kVstMaxProgNameLen-1] = '\0'; + return frame->value; } case effGetMidiKeyName: port->sendRequest();