mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-16 21:50:11 +02:00
Pass through getParameter and setParameter
This commit is contained in:
@@ -104,8 +104,6 @@ struct EventResult {
|
||||
*/
|
||||
std::optional<std::string> data;
|
||||
|
||||
// TODO: Add missing return value fields;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
s.value8b(return_value);
|
||||
@@ -114,6 +112,37 @@ struct EventResult {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Represents a call to either `getParameter` or `setParameter`, depending on
|
||||
* whether `value` contains a value or not.
|
||||
*/
|
||||
struct Parameter {
|
||||
int32_t index;
|
||||
std::optional<float> value;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
s.value4b(index);
|
||||
s.ext(value, bitsery::ext::StdOptional(),
|
||||
[](S& s, auto& v) { s.value4b(v); });
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* The result of a `getParameter` or a `setParameter` call. For `setParameter`
|
||||
* this struct won't contain any values and mostly acts as an acknowledgement
|
||||
* from the Wine VST host.
|
||||
*/
|
||||
struct ParameterResult {
|
||||
std::optional<float> value;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
s.ext(value, bitsery::ext::StdOptional(),
|
||||
[](S& s, auto& v) { s.value4b(v); });
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* The serialization function for `AEffect` structs. This will s serialize all
|
||||
* of the values but it will not touch any of the pointer fields. That way you
|
||||
|
||||
Reference in New Issue
Block a user