mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-10 22:32:10 +02:00
Fix the semantics of YaPhysicalUIMapList
We're supposed to take the list provided by the host, and modify the target note expression values.
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
|
||||
#include "physical-ui-map-list.h"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
YaPhysicalUIMapList::YaPhysicalUIMapList() {}
|
||||
|
||||
YaPhysicalUIMapList::YaPhysicalUIMapList(
|
||||
@@ -27,3 +29,14 @@ Steinberg::Vst::PhysicalUIMapList YaPhysicalUIMapList::get() {
|
||||
.count = static_cast<Steinberg::uint32>(maps.size()),
|
||||
.map = maps.data()};
|
||||
}
|
||||
|
||||
void YaPhysicalUIMapList::write_back(
|
||||
Steinberg::Vst::PhysicalUIMapList& list) const {
|
||||
assert(list.count == maps.size());
|
||||
|
||||
// Write the note expression IDs as updated by the plugin (if the plugin
|
||||
// updated them) back to the original list we've read from
|
||||
for (Steinberg::uint32 i = 0; i < list.count; i++) {
|
||||
list.map[i].noteExpressionTypeID = maps[i].noteExpressionTypeID;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user