~ubuntu-branches/ubuntu/raring/ecasound2.2/raring

« back to all changes in this revision

Viewing changes to manual-tests/sh-tests/test-audioselect.sh

  • Committer: Bazaar Package Importer
  • Author(s): Junichi Uekawa
  • Date: 2009-11-02 18:22:35 UTC
  • mfrom: (5.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20091102182235-4ngh7699dmkgonyu
Tags: 2.7.0-1
* New upstream release.
* Depend on libreadline-dev instead of libreadline5-dev by request of
  Mattias Klose. It's now libreadline6-dev. (closes: #553748)
* Update menu file to use section Applications/ instead of Apps/.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
3
# version:20091004-4
 
4
#
 
5
# Script to generate and test audio selecting.
 
6
# The output files need to be verified manually.
 
7
#
 
8
# ----------------------------------------------------------------------
 
9
# File: ecasound/manual-tests/test-klg.sh
 
10
# License: GPL (see ecasound/{AUTHORS,COPYING})
 
11
# ----------------------------------------------------------------------
 
12
 
 
13
if test "x${ECASOUND}" = "x" ; then
 
14
  ECASOUND=../../ecasound/ecasound_debug
 
15
fi
 
16
 
 
17
. test-common-sh
 
18
 
 
19
check_ecabin
 
20
 
 
21
# specify ecasound binary used to generate test reference files
 
22
ECAS_REF=ecasound-2.6.0
 
23
CMP=../utils/ecacompare
 
24
 
 
25
set -x
 
26
 
 
27
# generate source file
 
28
$ECASOUND -q -f:16,1,44100 -i tone,sine,880,0 -o src44100.wav -t:10 || error_exit
 
29
ln -s src44100.wav src44100.foobar
 
30
 
 
31
# perform test 1
 
32
set -x
 
33
$ECAS_REF -q -f:16,1,44100 -i select,1,22000sa,src44100.wav -o as-dst22000sa-ref.wav -x || error_exit
 
34
$ECASOUND -q -f:16,1,44100 -i select,1,22000sa,src44100.wav -o as-dst22000sa.wav -x || error_exit
 
35
set +x
 
36
samples=`sndfile-info as-dst22000sa.wav |grep Frames |cut -d ':' -f2`
 
37
if [ $samples != "22000" ] ; then error_exit ; fi
 
38
$CMP as-dst22000sa.wav as-dst22000sa-ref.wav
 
39
if [ $? != 0 ] ; then error_exit ; fi
 
40
 
 
41
# perform test 2 (lq -> ext resamplers are not necessarily supported)
 
42
set -x
 
43
$ECAS_REF -q -f:16,1,88200 -i select,1.9,33000sa,resample-lq,44100,src44100.wav -o as-dst33000sa-ref.wav -x || error_exit
 
44
$ECASOUND -q -f:16,1,88200 -i select,1.9,33000sa,resample-lq,44100,src44100.wav -o as-dst33000sa.wav -x || error_exit
 
45
set +x
 
46
samples=`sndfile-info as-dst33000sa.wav |grep Frames |cut -d ':' -f2`
 
47
if [ $samples != "33000" ] ; then error_exit ; fi
 
48
$CMP as-dst33000sa.wav as-dst33000sa-ref.wav
 
49
if [ $? != 0 ] ; then error_exit ; fi
 
50
 
 
51
# perform test 3
 
52
set -x
 
53
$ECAS_REF -q -f:16,1,44100 -i select,40000sa,55000sa,typeselect,.wav,src44100.foobar -o as-dst55000sa-ref.wav -x || error_exit
 
54
$ECASOUND -q -f:16,1,44100 -i select,40000sa,55000sa,typeselect,.wav,src44100.foobar -o as-dst55000sa.wav -x || error_exit
 
55
set +x
 
56
samples=`sndfile-info as-dst55000sa.wav |grep Frames |cut -d ':' -f2`
 
57
if [ $samples != "55000" ] ; then error_exit ; fi
 
58
$CMP as-dst55000sa.wav as-dst55000sa-ref.wav
 
59
if [ $? != 0 ] ; then error_exit ; fi
 
60
 
 
61
echo "Test run succesful (no manual verification needed)."
 
62
echo "Run './clean.sh' to remove created audio files."
 
63
 
 
64
exit 0