spa: Add UMP control type

UMP (universal Midi Packet) is an improved version of transmitting MIDI
messages. It also has support for MIDI 2.0 and is backwards compatible
with MIDI 1.0.
This commit is contained in:
Wim Taymans 2024-07-26 14:54:20 +02:00
parent bb82b2e493
commit 3e87aca7a9
3 changed files with 9 additions and 3 deletions

View file

@ -24,9 +24,12 @@ extern "C" {
/** Different Control types */
enum spa_control_type {
SPA_CONTROL_Invalid,
SPA_CONTROL_Properties, /**< data contains a SPA_TYPE_OBJECT_Props */
SPA_CONTROL_Midi, /**< data contains a spa_pod_bytes with raw midi data */
SPA_CONTROL_OSC, /**< data contains a spa_pod_bytes with an OSC packet */
SPA_CONTROL_Properties, /**< SPA_TYPE_OBJECT_Props */
SPA_CONTROL_Midi, /**< spa_pod_bytes with raw midi data (deprecated, use SPA_CONTROL_UMP) */
SPA_CONTROL_OSC, /**< spa_pod_bytes with an OSC packet */
SPA_CONTROL_UMP, /**< spa_pod_bytes with raw UMP (universal MIDI packet)
* data. The UMP 32 bit words are stored in native endian
* format. */
_SPA_CONTROL_LAST, /**< not part of ABI */
};

View file

@ -27,6 +27,7 @@ static const struct spa_type_info spa_type_control[] = {
{ SPA_CONTROL_Properties, SPA_TYPE_Int, SPA_TYPE_INFO_CONTROL_BASE "Properties", NULL },
{ SPA_CONTROL_Midi, SPA_TYPE_Int, SPA_TYPE_INFO_CONTROL_BASE "Midi", NULL },
{ SPA_CONTROL_OSC, SPA_TYPE_Int, SPA_TYPE_INFO_CONTROL_BASE "OSC", NULL },
{ SPA_CONTROL_UMP, SPA_TYPE_Int, SPA_TYPE_INFO_CONTROL_BASE "UMP", NULL },
{ 0, 0, NULL, NULL },
};

View file

@ -141,6 +141,8 @@ enum spa_format {
SPA_FORMAT_START_Stream = 0x50000,
/* Application Format keys */
SPA_FORMAT_START_Application = 0x60000,
SPA_FORMAT_CONTROL_types, /**< possible control types (flags choice Int,
* mask of enum spa_control_type) */
};
#define SPA_KEY_FORMAT_DSP "format.dsp" /**< a predefined DSP format,