boo/soxr/tests/large-ratio-test

24 lines
602 B
Plaintext
Raw Permalink Normal View History

2016-03-23 05:33:14 +00:00
#!/bin/bash
set -e
# SoX Resampler Library Copyright (c) 2007-15 robs@users.sourceforge.net
# Licence for this file: LGPL v2.1 See LICENCE for details.
# Tests interpolating then decimating be the same, large ratio.
tool=../examples/3-options-input-fn
q=6
ratio=2e4
srate=8000
nrate=`expr $srate / 2`
rm -f lr.png
../tests/vector-gen $srate 0 8 $nrate .9375 1.s32
$tool 1 $ratio 1 2 1 $q < 1.s32 | $tool $ratio 1 1 1 2 $q > 2.s32
sox -M -r $srate -c1 1.s32 -r $srate -c1 2.s32 -n spectrogram -hwd -Z-10 -z180 -o lr.png -c "large-ratio-test q:$q ratio:$ratio"
rm [12].s32