diff options
author | David Robillard <d@drobilla.net> | 2024-11-15 19:17:01 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2024-11-24 19:01:09 -0500 |
commit | e4eaf9b181c121a794f2acaea6e51aeaaf4ecffb (patch) | |
tree | 1b668fbede9a461cc8a839c2ee77e67ca81532e7 /src/jack.c | |
parent | b56679c566dfd01a3b09958e98dcadbbd306bfcb (diff) | |
download | jalv-e4eaf9b181c121a794f2acaea6e51aeaaf4ecffb.tar.gz jalv-e4eaf9b181c121a794f2acaea6e51aeaaf4ecffb.tar.bz2 jalv-e4eaf9b181c121a794f2acaea6e51aeaaf4ecffb.zip |
Improve const-correctness of Jack latency callback
Diffstat (limited to 'src/jack.c')
-rw-r--r-- | src/jack.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -244,9 +244,9 @@ jack_process_cb(jack_nframes_t nframes, void* data) /// Calculate latency assuming all ports depend on each other static void -jack_latency_cb(jack_latency_callback_mode_t mode, void* data) +jack_latency_cb(const jack_latency_callback_mode_t mode, void* const data) { - Jalv* const jalv = (Jalv*)data; + const Jalv* const jalv = (const Jalv*)data; const enum PortFlow flow = ((mode == JackCaptureLatency) ? FLOW_INPUT : FLOW_OUTPUT); @@ -254,7 +254,7 @@ jack_latency_cb(jack_latency_callback_mode_t mode, void* data) uint32_t ports_found = 0; jack_latency_range_t range = {UINT32_MAX, 0}; for (uint32_t p = 0; p < jalv->num_ports; ++p) { - struct Port* port = &jalv->ports[p]; + struct Port* const port = &jalv->ports[p]; if (port->sys_port && port->flow == flow) { jack_latency_range_t r; jack_port_get_latency_range(port->sys_port, mode, &r); @@ -278,7 +278,7 @@ jack_latency_cb(jack_latency_callback_mode_t mode, void* data) // Tell Jack about it for (uint32_t p = 0; p < jalv->num_ports; ++p) { - struct Port* port = &jalv->ports[p]; + const struct Port* const port = &jalv->ports[p]; if (port->sys_port && port->flow == flow) { jack_port_set_latency_range(port->sys_port, mode, &range); } |