From d2bcbdf9cfbf9c79566ddea29f9db1b322cd560e Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 20 Dec 2018 12:01:45 +0100 Subject: [PATCH] resample: fix unrolled counter --- spa/plugins/alsa/alsa-device.c | 1 + spa/plugins/audioconvert/resample-peaks-sse.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/spa/plugins/alsa/alsa-device.c b/spa/plugins/alsa/alsa-device.c index b1315cf40..9071a87f5 100644 --- a/spa/plugins/alsa/alsa-device.c +++ b/spa/plugins/alsa/alsa-device.c @@ -243,6 +243,7 @@ static int emit_info(struct impl *this) activate_profile(this, ctl_hndl, 0); exit: + spa_log_info(this->log, "close card %s", this->props.device); snd_ctl_close(ctl_hndl); return err; } diff --git a/spa/plugins/audioconvert/resample-peaks-sse.h b/spa/plugins/audioconvert/resample-peaks-sse.h index acc80244e..743105616 100644 --- a/spa/plugins/audioconvert/resample-peaks-sse.h +++ b/spa/plugins/audioconvert/resample-peaks-sse.h @@ -53,7 +53,7 @@ static void impl_peaks_process_sse(struct resample *r, int channel, end = end > pd->i_count ? end - pd->i_count : 0; chunk = SPA_MIN(end, *in_len); - unrolled = chunk - (chunk & 3); + unrolled = chunk - ((chunk - i) & 3); for (; i < unrolled; i+=4) { in = _mm_loadu_ps(&s[i]);