sox_ng/test/chorus-glitch/run
Martin Guy 2cbb9adc40 Make chorus-glitch test use a 16-bit test file not 32
Othrwise some buggy processors fail it with errors of a dozen
32-bit sample values e.g. Intel(R) Core(TM) i5-4570 with bugs:
    cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
    l1tf mds swapgs srbds mmio_unknown bhi its
2026-08-14 20:10:24 +02:00

36 lines
919 B
Bash
Executable file

#! /bin/sh
# See if chorus can get delay line wraparound wrong, issue #854
#
# Old versions of SoX and sox_ng may not have -l and -q or may
# not accept a delay of < 20ms, so if the command fails, say VOID.
rm -f none.wav line.wav quad.wav
status=0
${sox:-sox} -D demoWave.wav none.wav chorus 1.0 0.4 7.99999 1.0 83.3333 4 -t || exit 254
cmp -s none.wav none-OK.wav || {
echo 'chorus with no interpolation failed' 1>&2
status=2
}
# These didn't get glitches but check them anyway
${sox:-sox} -D demoWave.wav line.wav chorus -l 1.0 0.4 7.99999 1.0 83.3333 4 -t && {
cmp -s line.wav line-OK.wav || {
echo 'chorus with linear interpolation failed' 1>&2
status=2
}
}
${sox:-sox} -D demoWave.wav quad.wav chorus -q 1.0 0.4 7.99999 1.0 83.3333 4 -t && {
cmp -s quad.wav quad-OK.wav || {
echo 'chorus with quadratic interpolation failed' 1>&2
status=2
}
}
rm -f none.wav line.wav quad.wav
exit $status