From 9c37eddad24eb7e9bbc9aae723b3a992ec5b4c97 Mon Sep 17 00:00:00 2001 From: cbdev Date: Thu, 5 Dec 2019 19:31:14 +0100 Subject: Unify midi parsing/deparsing code --- backends/winmidi.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'backends/winmidi.h') diff --git a/backends/winmidi.h b/backends/winmidi.h index ffa6a26..8c2d76b 100644 --- a/backends/winmidi.h +++ b/backends/winmidi.h @@ -19,11 +19,11 @@ typedef struct /*_winmidi_instance_data*/ { enum /*_winmidi_channel_type*/ { none = 0, - note, - cc, - pressure, - aftertouch, - pitchbend + note = 0x90, + cc = 0xB0, + pressure = 0xA0, + aftertouch = 0xD0, + pitchbend = 0xE0 }; typedef union { -- cgit v1.2.3 From 3eada28582b144519e95a44ee3adc3f46d39036e Mon Sep 17 00:00:00 2001 From: cbdev Date: Thu, 5 Dec 2019 21:05:14 +0100 Subject: Add flags parameter to channel parser plugin API (Fixes #31) --- backends/winmidi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backends/winmidi.h') diff --git a/backends/winmidi.h b/backends/winmidi.h index 8c2d76b..985c46a 100644 --- a/backends/winmidi.h +++ b/backends/winmidi.h @@ -4,7 +4,7 @@ MM_PLUGIN_API int init(); static int winmidi_configure(char* option, char* value); static int winmidi_configure_instance(instance* inst, char* option, char* value); static instance* winmidi_instance(); -static channel* winmidi_channel(instance* inst, char* spec); +static channel* winmidi_channel(instance* inst, char* spec, uint8_t flags); static int winmidi_set(instance* inst, size_t num, channel** c, channel_value* v); static int winmidi_handle(size_t num, managed_fd* fds); static int winmidi_start(); -- cgit v1.2.3 From f65fb8baaba285f5ff4b02af111420ba4479f5d9 Mon Sep 17 00:00:00 2001 From: cbdev Date: Wed, 11 Dec 2019 23:02:22 +0100 Subject: Simplify plugin_start API --- backends/winmidi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backends/winmidi.h') diff --git a/backends/winmidi.h b/backends/winmidi.h index 985c46a..7907a42 100644 --- a/backends/winmidi.h +++ b/backends/winmidi.h @@ -7,7 +7,7 @@ static instance* winmidi_instance(); static channel* winmidi_channel(instance* inst, char* spec, uint8_t flags); static int winmidi_set(instance* inst, size_t num, channel** c, channel_value* v); static int winmidi_handle(size_t num, managed_fd* fds); -static int winmidi_start(); +static int winmidi_start(size_t n, instance** inst); static int winmidi_shutdown(); typedef struct /*_winmidi_instance_data*/ { -- cgit v1.2.3 From f6d6eefe9bb9934f4fa3e665734d746f02471cdb Mon Sep 17 00:00:00 2001 From: cbdev Date: Wed, 11 Dec 2019 23:20:34 +0100 Subject: Simplify plugin_stop API --- backends/winmidi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backends/winmidi.h') diff --git a/backends/winmidi.h b/backends/winmidi.h index 7907a42..81e7439 100644 --- a/backends/winmidi.h +++ b/backends/winmidi.h @@ -8,7 +8,7 @@ static channel* winmidi_channel(instance* inst, char* spec, uint8_t flags); static int winmidi_set(instance* inst, size_t num, channel** c, channel_value* v); static int winmidi_handle(size_t num, managed_fd* fds); static int winmidi_start(size_t n, instance** inst); -static int winmidi_shutdown(); +static int winmidi_shutdown(size_t n, instance** inst); typedef struct /*_winmidi_instance_data*/ { char* read; -- cgit v1.2.3