ConvoEngine: Make max channel counts configurable.
[wdl/wdl-ol.git] / IPlugExamples / IPlugConvoEngine / validate_audiounit.command
blobfa7d8475f33dec4997518a2fdaf83ef098ab129a
1 #! /bin/sh
2 # shell script to validate your iplug audiounit using auval
3 # run from terminal with the argument leaks to perform the leaks test (See auval docs)
5 BASEDIR=$(dirname $0)
7 cd $BASEDIR
9 PUID=`echo | grep PLUG_UNIQUE_ID resource.h`
10 PUID=${PUID//\#define PLUG_UNIQUE_ID }
11 PUID=${PUID//\'}
13 PMID=`echo | grep PLUG_MFR_ID resource.h`
14 PMID=${PMID//\#define PLUG_MFR_ID }
15 PMID=${PMID//\'}
17 PII=`echo | grep PLUG_IS_INST resource.h`
18 PII=${PII//\#define PLUG_IS_INST }
20 PDM=`echo | grep PLUG_DOES_MIDI resource.h`
21 PDM=${PDM//\#define PLUG_DOES_MIDI }
23 echo $PII
24 echo $PDM
26 TYPE=aufx
28 if [ $PII == 1 ] # instrument
29 then
30 TYPE=aumu
31 else
32 if [ $PDM == 1 ] # midi effect
33 then
34 TYPE=aumf
38 if [ "$1" == "leaks" ]
39 then
40 echo "testing for leaks (i386 32 bit)"
41 echo 'launch a new shell and type: ps axc|awk "{if (\$5==\"auvaltool\") print \$1}" to get the pid';
42 echo "then leaks PID"
44 export MallocStackLogging=1
45 set env MallocStackLoggingNoCompact=1
47 auval -v $TYPE $PUID $PMID -w -q
49 unset MallocStackLogging
51 else
53 echo "\nvalidating i386 32 bit... ------------------------"
54 echo "--------------------------------------------------"
55 echo "--------------------------------------------------"
56 echo "--------------------------------------------------"
57 echo "--------------------------------------------------"
58 echo "--------------------------------------------------"
60 auval -v $TYPE $PUID $PMID
62 echo "\nvalidating i386 64 bit... ------------------------"
63 echo "--------------------------------------------------"
64 echo "--------------------------------------------------"
65 echo "--------------------------------------------------"
66 echo "--------------------------------------------------"
67 echo "--------------------------------------------------"
69 auval -64 -v $TYPE $PUID $PMID
71 #[ -e "/var/db/receipts/com.apple.pkg.Rosetta.plist" ] && echo Rosetta installed || echo Rosetta NOT installed
72 #ppc auval not available on 10.6
74 #echo "\nvalidating ppc 32 bit... -------------------------"
75 #echo "--------------------------------------------------"
76 #echo "--------------------------------------------------"
77 #echo "--------------------------------------------------"
78 #echo "--------------------------------------------------"
79 #echo "--------------------------------------------------"
81 #auval -ppc -v $TYPE $PUID $PMID
84 echo "done"