-
Notifications
You must be signed in to change notification settings - Fork 3
/
validate_audiounit.command
85 lines (62 loc) · 2.32 KB
/
validate_audiounit.command
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#! /bin/sh
# shell script to validate your iplug audiounit using auval
# run from terminal with the argument leaks to perform the leaks test (See auval docs)
BASEDIR=$(dirname $0)
cd $BASEDIR
PUID=`echo | grep PLUG_UNIQUE_ID resource.h`
PUID=${PUID//\#define PLUG_UNIQUE_ID }
PUID=${PUID//\'}
PMID=`echo | grep PLUG_MFR_ID resource.h`
PMID=${PMID//\#define PLUG_MFR_ID }
PMID=${PMID//\'}
PII=`echo | grep PLUG_IS_INST resource.h`
PII=${PII//\#define PLUG_IS_INST }
PDM=`echo | grep PLUG_DOES_MIDI resource.h`
PDM=${PDM//\#define PLUG_DOES_MIDI }
echo $PII
echo $PDM
TYPE=aufx
if [ $PII == 1 ] # instrument
then
TYPE=aumu
else
if [ $PDM == 1 ] # midi effect
then
TYPE=aumf
fi
fi
if [ "$1" == "leaks" ]
then
echo "testing for leaks (i386 32 bit)"
echo 'launch a new shell and type: ps axc|awk "{if (\$5==\"auvaltool\") print \$1}" to get the pid';
echo "then leaks PID"
export MallocStackLogging=1
set env MallocStackLoggingNoCompact=1
auval -v $TYPE $PUID $PMID -w -q
unset MallocStackLogging
else
echo "\nvalidating i386 32 bit... ------------------------"
echo "--------------------------------------------------"
echo "--------------------------------------------------"
echo "--------------------------------------------------"
echo "--------------------------------------------------"
echo "--------------------------------------------------"
auval -v $TYPE $PUID $PMID
echo "\nvalidating i386 64 bit... ------------------------"
echo "--------------------------------------------------"
echo "--------------------------------------------------"
echo "--------------------------------------------------"
echo "--------------------------------------------------"
echo "--------------------------------------------------"
auval -64 -v $TYPE $PUID $PMID
#[ -e "/var/db/receipts/com.apple.pkg.Rosetta.plist" ] && echo Rosetta installed || echo Rosetta NOT installed
#ppc auval not available on 10.6
#echo "\nvalidating ppc 32 bit... -------------------------"
#echo "--------------------------------------------------"
#echo "--------------------------------------------------"
#echo "--------------------------------------------------"
#echo "--------------------------------------------------"
#echo "--------------------------------------------------"
#auval -ppc -v $TYPE $PUID $PMID
fi
echo "done"