Debian Codegraph @

tests/impulse-tests/deprecated/faust2impulse2bis

raw symbols SCIP
1 #!/bin/bash
2
3 #####################################################################
4 # #
5 # Compiles Faust programs to impulse tests #
6 # (c) Grame, 2017 #
7 # #
8 #####################################################################
9
10 for p in $@; do
11 if [ ${p:0:1} = "-" ]; then
12 OPTIONS="$OPTIONS $p"
13 elif [[ -f "$p" ]]; then
14 FILES="$FILES $p"
15 else
16 OPTIONS="$OPTIONS $p"
17 fi
18 done
19
20 P=$(dirname $0)
21
22 #-------------------------------------------------------------------
23 # compile the *.dsp files
24
25 for f in $FILES; do
26
27 # compile Faust to c++
28 faust -lang c $OPTIONS -i -a $P/archs/impulsearch2.cpp "$f" -o "$f.cpp" || exit
29
30 # compile c++ to binary
31 (
32 ${CXX=g++} ${CXXFLAGS=-O3 -std=c++11 -I$P -I../archs -pthread} $OMP "$f.cpp" -o "${f%.dsp}"
33 ) > /dev/null || exit
34
35 # run the resulting binary to generate the impulse response
36 ./"${f%.dsp}" -inpl
37
38 # cleanup
39 rm "${f%.dsp}" "$f.cpp"
40 done
41