rename ports
This commit is contained in:
parent
cd0d1ab8fe
commit
128e8abdb8
1 changed files with 10 additions and 10 deletions
20
guitfx.c
20
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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue