resample: fix unrolled counter

This commit is contained in:
Wim Taymans 2018-12-20 12:01:45 +01:00
parent 0c0bf3a62a
commit d2bcbdf9cf
2 changed files with 2 additions and 1 deletions

View file

@ -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;
}

View file

@ -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]);