rename ports

This commit is contained in:
Michael Sippel 2024-12-07 16:22:05 +01:00
parent cd0d1ab8fe
commit 128e8abdb8
Signed by: senvas
GPG key ID: 060F22F65102F95C

View file

@ -22,7 +22,7 @@ struct port {
struct data {
struct pw_main_loop * loop;
struct pw_filter * filter;
struct port *in_port;
struct port * guit_in_port;
struct port * midi_in_port;
struct port * out_port;
@ -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);