uji_audio.h
1.33 KB
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
#define NBUFFERS 20
#define AUDIO_HEAP_SIZE 300000
#define MAX_VOICES 22
#define NUM_SMPL_PER_FRAME 1280
#define DMA_BUFFER_LENGTH 0x600 /* Larger buffers result in fewer DMA' but more */
/* memory being used. */
#define NUM_DMA_MESSAGES 32 /* The maximum number of DMAs any one frame can */
/* have. */
#define FRAME_LAG 1 /* The number of frames to keep a dma buffer. */
/* Increasing this number causes buffers to not */
/* be deleted as quickly. This results in fewer */
/* DMA's but you need more buffers. */
typedef struct
{
ALLink node;
int startAddr;
u32 lastFrame;
char *ptr;
} DMABuffer;
typedef struct
{
u8 initialized;
DMABuffer *firstUsed;
DMABuffer *firstFree;
} DMAState;
/* $B8z2L2;MQ(B */
#define EVT_COUNT 32
/* $B%a%$%s%k!<%A%s$+$i8F$S=P$9%5%&%s%I%k!<%A%s(B */
extern void chkAppendSoundPlayer(void);
extern void chkPlaySound( int sound_number );
#define SOUND_PASS 0
#define SOUND_FAIL 1
#define SOUND_NONE 2