diff --git a/common/JackEventPort.cpp b/common/JackEventPort.cpp index 84d0cfa9..7409af51 100644 --- a/common/JackEventPort.cpp +++ b/common/JackEventPort.cpp @@ -167,4 +167,12 @@ const JackPortType gOscPortType = EventBufferMixdown }; +const JackPortType gEventPortType = +{ + JACK_DEFAULT_EVENT_TYPE, + EventBufferSize, + EventBufferInit, + EventBufferMixdown +}; + } // namespace Jack diff --git a/common/JackEventPort.h b/common/JackEventPort.h index 007e2332..2b2ff678 100644 --- a/common/JackEventPort.h +++ b/common/JackEventPort.h @@ -41,6 +41,11 @@ struct jack_event_t #define JACK_DEFAULT_MIDI_TYPE "8 bit raw midi" /** A Jack OSC port type. */ #define JACK_DEFAULT_OSC_TYPE "32 bit OSC" +/** If you want to toy around with a custom + * event protocol (maybe MIDI 3.0?). Please put details + * about it into the metadata. + */ +#define JACK_DEFAULT_EVENT_TYPE "generic binary data" namespace Jack { diff --git a/common/JackPortType.cpp b/common/JackPortType.cpp index 3be1c4d2..e41fcf7c 100644 --- a/common/JackPortType.cpp +++ b/common/JackPortType.cpp @@ -28,7 +28,8 @@ static const JackPortType* gPortTypes[] = { &gAudioPortType, &gMidiPortType, - &gOscPortType, + &gOscPortType, + &gEventPortType, }; jack_port_type_id_t PORT_TYPES_MAX = sizeof(gPortTypes) / sizeof(gPortTypes[0]); diff --git a/common/JackPortType.h b/common/JackPortType.h index ad4b58d2..c980333b 100644 --- a/common/JackPortType.h +++ b/common/JackPortType.h @@ -43,6 +43,7 @@ extern const struct JackPortType* GetPortType(jack_port_type_id_t port_type_id); extern const struct JackPortType gAudioPortType; extern const struct JackPortType gMidiPortType; extern const struct JackPortType gOscPortType; +extern const struct JackPortType gEventPortType; } // namespace Jack diff --git a/common/jack/types.h b/common/jack/types.h index 6288868e..45c947c1 100644 --- a/common/jack/types.h +++ b/common/jack/types.h @@ -446,11 +446,12 @@ typedef void (*JackInfoShutdownCallback)(jack_status_t code, const char* reason, /** * Used for the type argument of jack_port_register() for default - * audio ports and midi ports. + * audio ports and event ports. */ #define JACK_DEFAULT_AUDIO_TYPE "32 bit float mono audio" #define JACK_DEFAULT_MIDI_TYPE "8 bit raw midi" #define JACK_DEFAULT_OSC_TYPE "32 bit OSC" +#define JACK_DEFAULT_EVENT_TYPE "generic binary data" /** * For convenience, use this typedef if you want to be able to change