synScript.h 798 Bytes
#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__ */