synScript.h
798 Bytes
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
#ifndef __synScript__
#define __synScript__
#include <libaudio.h>
#define MAX_VOICES 1
#define MAX_WAVES 1
#define ONE_SEC 1000000
#define END_OF_SCRIPT 0x7FFFFFFF
typedef struct testplayer * TTestPlayerPtr;
typedef void (*TScriptActionProc)(TTestPlayerPtr);
typedef struct
{
TScriptActionProc fActionProc;
s32 fDeltaUsecs;
} TScriptAction;
typedef struct
{
s32 fActionIndex;
TScriptAction * fActionTable;
} TScript;
typedef struct
{
ALPlayer node; /* note: must be first in structure */
ALSynth *drvr;
TScript script;
int numVoices;
ALVoice voices[MAX_VOICES];
int numWaveTables;
ALWaveTable *waves[MAX_WAVES];
} TTestPlayer;
#endif /* __synScript__ */