From 128e8abdb8febfb9ea12894cb9433040344efc12 Mon Sep 17 00:00:00 2001 From: Michael Sippel Date: Sat, 7 Dec 2024 16:22:05 +0100 Subject: [PATCH] rename ports --- guitfx.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/guitfx.c b/guitfx.c index 351eb99..d304316 100644 --- a/guitfx.c +++ b/guitfx.c @@ -20,11 +20,11 @@ struct port { }; struct data { - struct pw_main_loop *loop; - struct pw_filter *filter; - struct port *in_port; - struct port *midi_in_port; - struct port *out_port; + struct pw_main_loop * loop; + struct pw_filter * filter; + struct port * guit_in_port; + struct port * midi_in_port; + struct port * out_port; //! elapsed time in number of samples uint64_t time; @@ -89,7 +89,7 @@ static void on_process(void *userdata, struct spa_io_position *position) pw_filter_queue_buffer(data->midi_in_port, b); - in = pw_filter_get_dsp_buffer(data->in_port, n_samples); + in = pw_filter_get_dsp_buffer(data->guit_in_port, n_samples); out = pw_filter_get_dsp_buffer(data->out_port, n_samples); if( in && out ) { @@ -139,19 +139,19 @@ int main(int argc, char *argv[]) sizeof(struct port), pw_properties_new( PW_KEY_FORMAT_DSP, "8 bit raw midi", - PW_KEY_PORT_NAME, "midi-input", + PW_KEY_PORT_NAME, "midi in", NULL ), NULL, 0 ); - data.in_port = pw_filter_add_port(data.filter, + data.guit_in_port = pw_filter_add_port(data.filter, PW_DIRECTION_INPUT, PW_FILTER_PORT_FLAG_MAP_BUFFERS, sizeof(struct port), pw_properties_new( PW_KEY_FORMAT_DSP, "32 bit float mono audio", - PW_KEY_PORT_NAME, "guitar input", + PW_KEY_PORT_NAME, "guitar in", NULL), NULL, 0); @@ -161,7 +161,7 @@ int main(int argc, char *argv[]) sizeof(struct port), pw_properties_new( PW_KEY_FORMAT_DSP, "32 bit float mono audio", - PW_KEY_PORT_NAME, "guitar output", + PW_KEY_PORT_NAME, "fx out", NULL), NULL, 0);