File: tests.sh

package info (click to toggle)
sox 12.16-6
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,180 kB
  • ctags: 1,466
  • sloc: ansic: 16,658; sh: 2,071; makefile: 126
file content (41 lines) | stat: -rwxr-xr-x 1,468 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/sh
#
# SOX Test script.  This should run without core-dumping or printing any
# messages from the compare program.
#
# This script is manual just quick sanity check of SOX.

file=monkey

# verbose options
#noise=-V

rm -f out.raw out2.raw in.raw 
./sox $noise $file.voc ub.raw 
./sox $noise -t raw -r 8196 -u -b -c 1 ub.raw -r 8196 -s -b sb.raw
./sox $noise -t raw -r 8196 -s -b -c 1 sb.raw -r 8196 -u -b ub2.raw
./sox $noise -r 8196 -u -b -c 1 ub2.raw -r 8196 ub2.voc 
echo Comparing ub.raw o ub2.raw
cmp -l ub.raw ub2.raw
# skip checksum and rate byte
echo Comparing $file.voc to ub2.voc, ignoring Comment field
cmp -l $file.voc ub2.voc | grep -v '^    2[3456]' | grep -v '^    31'
rm -f ub.raw sb.raw ub2.raw ub2.voc
./sox $noise $file.au -u -r 8192 -u -b ub.raw
./sox $noise -r 8192 -u -b ub.raw -U -b ub.au 
./sox $noise ub.au -u ub2.raw 
./sox $noise ub.au -w ub2.sf
rm -f ub.raw ub.au ub2.raw ub.sf 
./sox $noise ub2.sf ub2.aiff
./sox $noise ub2.aiff ub3.sf
echo Comparing ub2.sf to ub3.sf, ignoring Comment field
cmp -l ub2.sf ub3.sf | grep -v '^    2[3456789]'
rm -f ub2.sf ub2.aiff ub3.sf
#
# Cmp -l of stop.raw and stop2.raw will show that most of the 
# bytes are 1 apart.  This is quantization error.
#
# rm -f stop.raw stop2.raw stop2.au
# Bytes 23 - 26 are the revision level of VOC file utilities and checksum.
# We may use different ones than Sound Blaster utilities do.
# We use 0/1 for the major/minor, SB uses that on the 1.15 utility disk.