diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/jack.c | 18 | ||||
-rw-r--r-- | src/jalv.c | 8 | ||||
-rw-r--r-- | src/lv2_evbuf.c | 6 | ||||
-rw-r--r-- | src/lv2_evbuf.h | 4 | ||||
-rw-r--r-- | src/portaudio.c | 10 |
5 files changed, 15 insertions, 31 deletions
@@ -173,12 +173,8 @@ jack_process_cb(jack_nframes_t nframes, void* data) // Write transport change event if applicable LV2_Evbuf_Iterator iter = lv2_evbuf_begin(port->evbuf); if (xport_changed) { - lv2_evbuf_write(&iter, - 0, - 0, - lv2_pos->type, - lv2_pos->size, - (const uint8_t*)LV2_ATOM_BODY(lv2_pos)); + lv2_evbuf_write( + &iter, 0, 0, lv2_pos->type, lv2_pos->size, LV2_ATOM_BODY(lv2_pos)); } if (jalv->request_update) { @@ -186,12 +182,8 @@ jack_process_cb(jack_nframes_t nframes, void* data) const LV2_Atom_Object get = { {sizeof(LV2_Atom_Object_Body), jalv->urids.atom_Object}, {0, jalv->urids.patch_Get}}; - lv2_evbuf_write(&iter, - 0, - 0, - get.atom.type, - get.atom.size, - (const uint8_t*)LV2_ATOM_BODY_CONST(&get)); + lv2_evbuf_write( + &iter, 0, 0, get.atom.type, get.atom.size, LV2_ATOM_BODY_CONST(&get)); } if (port->sys_port) { @@ -239,7 +231,7 @@ jack_process_cb(jack_nframes_t nframes, void* data) uint32_t subframes = 0; uint32_t type = 0; uint32_t size = 0; - uint8_t* body = NULL; + void* body = NULL; lv2_evbuf_get(i, &frames, &subframes, &type, &size, &body); if (buf && type == jalv->urids.midi_MidiEvent) { @@ -555,12 +555,8 @@ jalv_apply_ui_events(Jalv* jalv, uint32_t nframes) } else if (ev.protocol == jalv->urids.atom_eventTransfer) { LV2_Evbuf_Iterator e = lv2_evbuf_end(port->evbuf); const LV2_Atom* const atom = (const LV2_Atom*)body; - lv2_evbuf_write(&e, - nframes, - 0, - atom->type, - atom->size, - (const uint8_t*)LV2_ATOM_BODY_CONST(atom)); + lv2_evbuf_write( + &e, nframes, 0, atom->type, atom->size, LV2_ATOM_BODY_CONST(atom)); } else { jalv_log( JALV_LOG_ERR, "Unknown control change protocol %u\n", ev.protocol); diff --git a/src/lv2_evbuf.c b/src/lv2_evbuf.c index d73b339..f19aac2 100644 --- a/src/lv2_evbuf.c +++ b/src/lv2_evbuf.c @@ -127,7 +127,7 @@ lv2_evbuf_get(LV2_Evbuf_Iterator iter, uint32_t* subframes, uint32_t* type, uint32_t* size, - uint8_t** data) + void** data) { *frames = *subframes = *type = *size = 0; *data = NULL; @@ -145,7 +145,7 @@ lv2_evbuf_get(LV2_Evbuf_Iterator iter, *subframes = 0; *type = aev->body.type; *size = aev->body.size; - *data = (uint8_t*)LV2_ATOM_BODY(&aev->body); + *data = LV2_ATOM_BODY(&aev->body); return true; } @@ -156,7 +156,7 @@ lv2_evbuf_write(LV2_Evbuf_Iterator* iter, uint32_t subframes, uint32_t type, uint32_t size, - const uint8_t* data) + const void* data) { (void)subframes; diff --git a/src/lv2_evbuf.h b/src/lv2_evbuf.h index caf029a..685bef8 100644 --- a/src/lv2_evbuf.h +++ b/src/lv2_evbuf.h @@ -97,7 +97,7 @@ lv2_evbuf_get(LV2_Evbuf_Iterator iter, uint32_t* subframes, uint32_t* type, uint32_t* size, - uint8_t** data); + void** data); /** Write an event at `iter`. @@ -114,7 +114,7 @@ lv2_evbuf_write(LV2_Evbuf_Iterator* iter, uint32_t subframes, uint32_t type, uint32_t size, - const uint8_t* data); + const void* data); #ifdef __cplusplus } diff --git a/src/portaudio.c b/src/portaudio.c index 7178e76..c15ed07 100644 --- a/src/portaudio.c +++ b/src/portaudio.c @@ -48,12 +48,8 @@ pa_process_cb(const void* inputs, {sizeof(LV2_Atom_Object_Body), jalv->urids.atom_Object}, {0, jalv->urids.patch_Get}}; LV2_Evbuf_Iterator iter = lv2_evbuf_begin(port->evbuf); - lv2_evbuf_write(&iter, - 0, - 0, - get.atom.type, - get.atom.size, - (const uint8_t*)LV2_ATOM_BODY(&get)); + lv2_evbuf_write( + &iter, 0, 0, get.atom.type, get.atom.size, LV2_ATOM_BODY(&get)); } } else if (port->type == TYPE_EVENT) { // Clear event output for plugin to write to @@ -74,7 +70,7 @@ pa_process_cb(const void* inputs, i = lv2_evbuf_next(i)) { // Get event from LV2 buffer uint32_t frames, subframes, type, size; - uint8_t* body; + void* body; lv2_evbuf_get(i, &frames, &subframes, &type, &size, &body); if (jalv->has_ui) { |