mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-10 04:30:12 +02:00
Add opcodes and structs for speaker arrangements
This commit is contained in:
@@ -400,6 +400,12 @@ std::optional<std::string> opcode_to_string(bool is_dispatch, int opcode) {
|
|||||||
case effGetMidiKeyName:
|
case effGetMidiKeyName:
|
||||||
return "effGetMidiKeyName";
|
return "effGetMidiKeyName";
|
||||||
break;
|
break;
|
||||||
|
case effSetSpeakerArrangement:
|
||||||
|
return "effSetSpeakerArrangement";
|
||||||
|
break;
|
||||||
|
case effGetSpeakerArrangement:
|
||||||
|
return "effGetSpeakerArrangement ";
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
break;
|
break;
|
||||||
|
|||||||
+47
-11
@@ -19,22 +19,34 @@
|
|||||||
// This file contains important opcodes and structs missing from
|
// This file contains important opcodes and structs missing from
|
||||||
// `vestige/aeffectx.h`
|
// `vestige/aeffectx.h`
|
||||||
|
|
||||||
// Glanced from https://www.kvraudio.com/forum/viewtopic.php?p=2744675#p2744675.
|
/**
|
||||||
// These opcodes are used to retrieve names and specific properties for a
|
* Glanced from https://www.kvraudio.com/forum/viewtopic.php?p=2744675#p2744675.
|
||||||
// plugin's inputs and outputs, if the plugin supports this. The index parameter
|
* These opcodes are used to retrieve names and specific properties for a
|
||||||
// is used to specify the index of the channel being queried, and the plugin
|
* plugin's inputs and outputs, if the plugin supports this. The index parameter
|
||||||
// gets passed an empty struct to describe the input/output through the data
|
* is used to specify the index of the channel being queried, and the plugin
|
||||||
// parameter. Finally the plugin returns a string containing the input or output
|
* gets passed an empty struct to describe the input/output through the data
|
||||||
// name.
|
* parameter. Finally the plugin returns a string containing the input or output
|
||||||
|
* name.
|
||||||
|
*/
|
||||||
constexpr int effGetInputProperties = 33;
|
constexpr int effGetInputProperties = 33;
|
||||||
constexpr int effGetOutputProperties = 34;
|
constexpr int effGetOutputProperties = 34;
|
||||||
|
|
||||||
// Found on
|
/**
|
||||||
// https://github.com/falkTX/Carla/blob/07e876a743c5e15c358be170af2e523eadc7dbfa/source/utils/CarlaVstUtils.hpp#L75
|
* Found on
|
||||||
// Used to assign names to MIDI keys, for some reason uses the `VstMidiKeyName`
|
* https://github.com/falkTX/Carla/blob/07e876a743c5e15c358be170af2e523eadc7dbfa/source/utils/CarlaVstUtils.hpp#L75
|
||||||
// struct defined below rather than a simple string.
|
* Used to assign names to MIDI keys, for some reason uses the `VstMidiKeyName`
|
||||||
|
* struct defined below rather than a simple string.
|
||||||
|
*/
|
||||||
constexpr int effGetMidiKeyName = 66;
|
constexpr int effGetMidiKeyName = 66;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Events used to tell a plugin to use a specific speaker arrangement (is this
|
||||||
|
* used outside of things like Dolby Atmos?), or to query its preferred speaker
|
||||||
|
* arrangement. Found on the same list as above.
|
||||||
|
*/
|
||||||
|
constexpr int effSetSpeakerArrangement = 42;
|
||||||
|
constexpr int effGetSpeakerArrangement = 69;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The struct that's being passed through the data parameter during the
|
* The struct that's being passed through the data parameter during the
|
||||||
* `effGetInputProperties` and `effGetOutputProperties` opcodes. Reverse
|
* `effGetInputProperties` and `effGetOutputProperties` opcodes. Reverse
|
||||||
@@ -54,3 +66,27 @@ struct VstIOProperties {
|
|||||||
struct VstMidiKeyName {
|
struct VstMidiKeyName {
|
||||||
char data[80];
|
char data[80];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains information about a speaker, used during
|
||||||
|
* `eff{Get,Set}SpeakerArrangement`.
|
||||||
|
*/
|
||||||
|
struct VstSpeaker {
|
||||||
|
char data[112];
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains information about a speaker setup, either for input or output. Used
|
||||||
|
* during `eff{Get,Set}SpeakerArrangement`. Reverse engineered from Renoise by
|
||||||
|
* attaching gdb and dumping both the `value` and `data` pointers when the host
|
||||||
|
* calls opcode 42.
|
||||||
|
*/
|
||||||
|
struct VstSpeakerArrangement {
|
||||||
|
int flags;
|
||||||
|
int num_speakers;
|
||||||
|
/**
|
||||||
|
* Variable length array of speakers. Similar to how `VstEvents` works, but
|
||||||
|
* with an array of objects instead of an array of pointers to objects.
|
||||||
|
*/
|
||||||
|
VstSpeaker speakers[8];
|
||||||
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user