From aa092469e21674bb99275dda08a695f0d426f6de Mon Sep 17 00:00:00 2001 From: cbdev Date: Sun, 8 Dec 2019 15:43:05 +0100 Subject: rtpmidi channel spec parsing --- backends/rtpmidi.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'backends/rtpmidi.h') diff --git a/backends/rtpmidi.h b/backends/rtpmidi.h index af6a189..c076fd0 100644 --- a/backends/rtpmidi.h +++ b/backends/rtpmidi.h @@ -16,11 +16,31 @@ static int rtpmidi_shutdown(); #define RTPMIDI_MDNS_PORT "5353" #define RTPMIDI_HEADER_MAGIC htobe16(0x80E1) +enum /*_rtpmidi_channel_type*/ { + none = 0, + note = 0x90, + cc = 0xB0, + pressure = 0xA0, + aftertouch = 0xD0, + pitchbend = 0xE0 +}; + typedef enum /*_rtpmidi_instance_mode*/ { + unconfigured = 0, direct, apple } rtpmidi_instance_mode; +typedef union { + struct { + uint8_t pad[5]; + uint8_t type; + uint8_t channel; + uint8_t control; + } fields; + uint64_t label; +} rtpmidi_channel_ident; + typedef struct /*_rtpmidi_peer*/ { struct sockaddr_storage dest; socklen_t dest_len; -- cgit v1.2.3