Commit 7ef7b58f authored by Erik de Castro Lopo's avatar Erik de Castro Lopo
Browse files

test/test_replaygain.sh : Minor cleanup.

* Pipe un-needed strerr output to /dev/null.
* Pass --silent and --no-seektable to the flac executable.
* When generating tones, use --output-name=....
parent 875be0ad
...@@ -73,7 +73,7 @@ check_flac () ...@@ -73,7 +73,7 @@ check_flac ()
echo "Generating stream..." echo "Generating stream..."
bytes=80000 bytes=80000
if dd if=/dev/zero ibs=1 count=$bytes | flac${EXE} --force --verify -0 --input-size=$bytes --output-name=$flacfile --force-raw-format --endian=big --sign=signed --channels=1 --bps=8 --sample-rate=8000 - ; then if dd if=/dev/zero ibs=1 count=$bytes 2>/dev/null | flac${EXE} --silent --force --verify -0 --input-size=$bytes --output-name=$flacfile --force-raw-format --endian=big --sign=signed --channels=1 --bps=8 --sample-rate=8000 - ; then
chmod +w $flacfile chmod +w $flacfile
else else
die "ERROR during generation" die "ERROR during generation"
...@@ -128,7 +128,8 @@ tonegenerator () ...@@ -128,7 +128,8 @@ tonegenerator ()
} }
}' /dev/null | }' /dev/null |
flac${EXE} --silent --no-error-on-compression-fail --force-raw-format \ flac${EXE} --force --output-name=$2 \
--silent --no-seektable --no-error-on-compression-fail --force-raw-format \
--endian=big --channels=1 --bps=24 --sample-rate=$1 --sign=unsigned - --endian=big --channels=1 --bps=24 --sample-rate=$1 --sign=unsigned -
} }
...@@ -168,7 +169,7 @@ for ACTION in $REPLAYGAIN_FREQ ; do ...@@ -168,7 +169,7 @@ for ACTION in $REPLAYGAIN_FREQ ; do
RATE=$(($MULTIPLE * FREQ)) RATE=$(($MULTIPLE * FREQ))
[ $MULTIPLE -eq 1 -o -n "${REPLAYGAIN_FREQ##* $RATE/*}" ] || break [ $MULTIPLE -eq 1 -o -n "${REPLAYGAIN_FREQ##* $RATE/*}" ] || break
echo -n "Testing FLAC replaygain $RATE ($FREQ x $MULTIPLE) ... " echo -n "Testing FLAC replaygain $RATE ($FREQ x $MULTIPLE) ... "
tonegenerator $RATE > $flacfile tonegenerator $RATE $flacfile
run_metaflac --add-replay-gain $flacfile run_metaflac --add-replay-gain $flacfile
run_metaflac --list $flacfile | grep REPLAYGAIN.*GAIN= | run_metaflac --list $flacfile | grep REPLAYGAIN.*GAIN= |
while read -r REPLAYGAIN ; do while read -r REPLAYGAIN ; do
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment