mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-10 04:30:12 +02:00
Fix time info cache being applied to other opcodes
I don't know how I've never noticed this, but we should of course only be handling `audioMasterGetTime()` this way. This also explains why enabling this permanently in the past broke some plugins.
This commit is contained in:
@@ -38,6 +38,8 @@ Versioning](https://semver.org/spec/v2.0.0.html).
|
|||||||
fix, MIDI events are now deallocated later then when they normally would have
|
fix, MIDI events are now deallocated later then when they normally would have
|
||||||
to be.
|
to be.
|
||||||
- Fixed _UVI Plugsound Free_ crashing during initialization.
|
- Fixed _UVI Plugsound Free_ crashing during initialization.
|
||||||
|
- Fixed the `cache_time_info` `yabridge.toml` option also affecting the results
|
||||||
|
of other host callbacks during audio processing.
|
||||||
|
|
||||||
## [3.1.0] - 2021-04-15
|
## [3.1.0] - 2021-04-15
|
||||||
|
|
||||||
|
|||||||
@@ -595,13 +595,17 @@ intptr_t Vst2Bridge::host_callback(AEffect* effect,
|
|||||||
intptr_t value,
|
intptr_t value,
|
||||||
void* data,
|
void* data,
|
||||||
float option) {
|
float option) {
|
||||||
// HACK: Workaround for a bug in SWAM Cello where it would call
|
switch (opcode) {
|
||||||
// `audioMasterGetTime()` once for every sample. When this option is
|
case audioMasterGetTime: {
|
||||||
// enabled `time_info` should be reset in the process function. The
|
// HACK: Workaround for a bug in SWAM Cello where it would call
|
||||||
// `time_info` value is assigned inside of
|
// `audioMasterGetTime()` once for every sample. When this
|
||||||
// `HostCallbackDataConverter::write()`.
|
// option is enabled `time_info` should be reset in the
|
||||||
if (config.cache_time_info && time_info) {
|
// process function. The `time_info` value is assigned inside
|
||||||
return reinterpret_cast<intptr_t>(&*time_info);
|
// of `HostCallbackDataConverter::write()`.
|
||||||
|
if (config.cache_time_info && time_info) {
|
||||||
|
return reinterpret_cast<intptr_t>(&*time_info);
|
||||||
|
}
|
||||||
|
} break;
|
||||||
}
|
}
|
||||||
|
|
||||||
HostCallbackDataConverter converter(effect, time_info);
|
HostCallbackDataConverter converter(effect, time_info);
|
||||||
|
|||||||
Reference in New Issue
Block a user