From c705bfa895333950c40e40a6de5e701a03e9cbe1 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Wed, 16 Mar 2022 01:29:31 -0400 Subject: Fix unused argument warnings --- src/mixer.c | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'src') diff --git a/src/mixer.c b/src/mixer.c index 60233de..8b41152 100644 --- a/src/mixer.c +++ b/src/mixer.c @@ -7,57 +7,55 @@ #include #include +struct params { + float gain, + bias_l, + bias_r; +}; + static void mixer_apply_mono_to_mono(int16_t *dest, int16_t *src, size_t count, - float gain, - float bias_l, - float bias_r) { + struct params params) { size_t i; for (i=0; ioutput; xas_mixer_input *input = mixer->inputs; + struct params params = { + .gain = input->gain, + .bias_l = input->bias_l, + .bias_r = input->bias_r + }; + xas_audio_zero(output->format, mixer->buf, 0, mixer->buffer_size); while (input) { void (*mixer_apply)(int16_t *, int16_t *, size_t, - float, - float, - float); + struct params); xas_mixer_input *next = input->next; int16_t *buf; @@ -108,9 +110,7 @@ static ssize_t mixer_fill(xas_mixer *mixer, mixer_apply((int16_t *)(mixer->buf), buf, readlen, - input->gain, - input->bias_l, - input->bias_r); + params); if (total < readlen) { total = readlen; @@ -148,7 +148,7 @@ static int set_gain(xas_mixer *mixer, float gain) { return 0; } -static int noop(xas_mixer *mixer) { +static int noop() { return 0; } -- cgit v1.2.3