7 #define SND_BUFFERSIZE 384 // process 2ms sound data
9 #define DSP_DEFAULT_FREQ 48000
11 #define VOICE_STATE_STOPPED 0
12 #define VOICE_STATE_RUNNING 1
13 #define VOICE_STATE_STREAM 2
15 #define VOICE_MONO8 0x00000000
16 #define VOICE_STEREO8 0x00000001
17 #define VOICE_MONO16 0x00000002
18 #define VOICE_STEREO16 0x00000003
20 #define VOICE_FREQ32KHZ 32000
21 #define VOICE_FREQ48KHZ 48000
27 typedef struct aesndpb_t AESNDPB
;
29 typedef void (*AESNDVoiceCallback
)(AESNDPB
*pb
,u32 state
);
30 typedef void (*AESNDAudioCallback
)(void *audio_buffer
,u32 len
);
34 void AESND_Pause(bool pause
);
35 u32
AESND_GetDSPProcessTime();
36 f32
AESND_GetDSPProcessUsage();
37 AESNDAudioCallback
AESND_RegisterAudioCallback(AESNDAudioCallback cb
);
39 AESNDPB
* AESND_AllocateVoice(AESNDVoiceCallback cb
);
40 void AESND_FreeVoice(AESNDPB
*pb
);
41 void AESND_SetVoiceStop(AESNDPB
*pb
,bool stop
);
42 void AESND_SetVoiceMute(AESNDPB
*pb
,bool mute
);
43 void AESND_SetVoiceLoop(AESNDPB
*pb
,bool loop
);
44 void AESND_SetVoiceFormat(AESNDPB
*pb
,u32 format
);
45 void AESND_SetVoiceStream(AESNDPB
*pb
,bool stream
);
46 void AESND_SetVoiceFrequency(AESNDPB
*pb
,u32 freq
);
47 void AESND_SetVoiceVolume(AESNDPB
*pb
,u16 volume_l
,u16 volume_r
);
48 void AESND_SetVoiceBuffer(AESNDPB
*pb
,const void *buffer
,u32 len
);
49 void AESND_PlayVoice(AESNDPB
*pb
,u32 format
,const void *buffer
,u32 len
,u32 freq
,u32 delay
,bool looped
);
50 AESNDVoiceCallback
AESND_RegisterVoiceCallback(AESNDPB
*pb
,AESNDVoiceCallback cb
);