]> git.alsa-project.org Git - alsa-utils.git/commitdiff
alsaloop: samplerate - fix the wrong pointer operation
authorJaroslav Kysela <perex@perex.cz>
Wed, 31 Mar 2021 14:38:37 +0000 (16:38 +0200)
committerJaroslav Kysela <perex@perex.cz>
Wed, 31 Mar 2021 14:38:37 +0000 (16:38 +0200)
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 <perex@perex.cz>
alsaloop/pcmjob.c

index 01e01994c00d35c7157a3e89a6e7b3a32472ae6d..4efdd63f25217c7d35893ce6dedd97c0ee9d0634 100644 (file)
@@ -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;