-
Notifications
You must be signed in to change notification settings - Fork 3
/
validate_audiounit.command
executable file
·85 lines (62 loc) · 2.01 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
OS_VERSION=`sw_vers -productVersion | egrep -o '10\.[0-9]+'`
x86_ARGS=""
x64_ARGS=""
if [[ $OS_VERSION == "10.9" ]] || [[ $OS_VERSION == "10.10" ]]
then
x86_ARGS="-32"
x64_ARGS=""
else
x86_ARGS=""
x64_ARGS="-64"
fi
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 }
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 $x86_ARGS -v $TYPE $PUID $PMID -w -q
unset MallocStackLogging
else
echo "\nvalidating i386 32 bit... ------------------------"
echo "--------------------------------------------------"
echo "--------------------------------------------------"
echo "--------------------------------------------------"
echo "--------------------------------------------------"
echo "--------------------------------------------------"
auval $x86_ARGS -v $TYPE $PUID $PMID
echo "\nvalidating i386 64 bit... ------------------------"
echo "--------------------------------------------------"
echo "--------------------------------------------------"
echo "--------------------------------------------------"
echo "--------------------------------------------------"
echo "--------------------------------------------------"
auval $x64_ARGS -v $TYPE $PUID $PMID
fi
echo "done"