aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends/osc.c
diff options
context:
space:
mode:
Diffstat (limited to 'backends/osc.c')
-rw-r--r--backends/osc.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/backends/osc.c b/backends/osc.c
index 77bbde4..beb5527 100644
--- a/backends/osc.c
+++ b/backends/osc.c
@@ -13,14 +13,6 @@
#define osc_align(a) ((((a) / 4) + (((a) % 4) ? 1 : 0)) * 4)
#define BACKEND_NAME "osc"
-typedef union {
- struct {
- uint32_t channel;
- uint32_t parameter;
- } fields;
- uint64_t label;
-} osc_channel_ident;
-
static struct {
uint8_t detect;
} osc_global_config = {
@@ -40,6 +32,11 @@ int init(){
.shutdown = osc_shutdown
};
+ if(sizeof(osc_channel_ident) != sizeof(uint64_t)){
+ fprintf(stderr, "OSC channel identification union out of bounds\n");
+ return 1;
+ }
+
//register backend
if(mm_backend_register(osc)){
fprintf(stderr, "Failed to register OSC backend\n");