From: Jaroslav Kysela Date: Wed, 31 Mar 2021 14:38:37 +0000 (+0200) Subject: alsaloop: samplerate - fix the wrong pointer operation X-Git-Tag: v1.2.5~43 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=7a7e064f83f128e4e115c24ef15ba6788b1709a6;p=alsa-utils.git alsaloop: samplerate - fix the wrong pointer operation It seems that the warnings fix introduced a regression. BugLink: https://github.com/alsa-project/alsa-utils/issues/85 Fixes: cc46d02 ("alsaloop: pcmjob - fix few warnings") Signed-off-by: Jaroslav Kysela --- diff --git a/alsaloop/pcmjob.c b/alsaloop/pcmjob.c index 01e0199..4efdd63 100644 --- a/alsaloop/pcmjob.c +++ b/alsaloop/pcmjob.c @@ -556,13 +556,13 @@ static void buf_add_src(struct loopback *loop) if (capt->format == SND_PCM_FORMAT_S32) src_int_to_float_array((int *)(capt->buf + pos1 * capt->frame_size), - (void *)loop->src_data.data_in + + (float *)loop->src_data.data_in + pos * capt->channels, count1 * capt->channels); else src_short_to_float_array((short *)(capt->buf + pos1 * capt->frame_size), - (void *)loop->src_data.data_in + + (float *)loop->src_data.data_in + pos * capt->channels, count1 * capt->channels); count -= count1;