From 81c6af48f9b63171d1f407f8203f742cd64c3688 Mon Sep 17 00:00:00 2001 From: cbdev Date: Sun, 15 Dec 2019 22:30:06 +0100 Subject: Initial AppleMIDI session support --- backends/rtpmidi.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'backends/rtpmidi.h') diff --git a/backends/rtpmidi.h b/backends/rtpmidi.h index b56000a..d4ca044 100644 --- a/backends/rtpmidi.h +++ b/backends/rtpmidi.h @@ -16,7 +16,16 @@ static int rtpmidi_shutdown(size_t n, instance** inst); #define RTPMIDI_PACKET_BUFFER 8192 #define RTPMIDI_DEFAULT_HOST "::" #define RTPMIDI_MDNS_PORT "5353" -#define RTPMIDI_HEADER_MAGIC htobe16(0x80E1) +#define RTPMIDI_HEADER_MAGIC 0x80 +#define RTPMIDI_HEADER_TYPE 0x61 +#define RTPMIDI_GET_TYPE(a) ((a) & 0x7F) + +#define APPLEMIDI_INVITE "IN" +#define APPLEMIDI_ACCEPT "OK" +#define APPLEMIDI_REJECT "NO" +#define APPLEMIDI_LEAVE "BY" +#define APPLEMIDI_SYNC "CK" +#define APPLEMIDI_FEEDBACK "RS" enum /*_rtpmidi_channel_type*/ { none = 0, @@ -96,7 +105,8 @@ typedef struct /*_apple_session_feedback*/ { } apple_feedback; typedef struct /*_rtp_midi_header*/ { - uint16_t vpxccmpt; //this is really just an amalgamated constant value + uint8_t vpxcc; + uint8_t mpt; uint16_t sequence; uint32_t timestamp; uint32_t ssrc; -- cgit v1.2.3