00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef __AUDIOLIB_H__
00015 #define __AUDIOLIB_H__
00016
00017 #ifdef __cplusplus
00018 extern "C" {
00019 #endif
00020
00021 #define PSP_NUM_AUDIO_CHANNELS 4
00022
00024 #define PSP_NUM_AUDIO_SAMPLES 1024
00025 #define PSP_VOLUME_MAX 0x8000
00026
00027 typedef void (* pspAudioCallback_t)(void *buf, unsigned int reqn, void *pdata);
00028
00029 typedef struct {
00030 int threadhandle;
00031 int handle;
00032 int volumeleft;
00033 int volumeright;
00034 pspAudioCallback_t callback;
00035 void *pdata;
00036 } psp_audio_channelinfo;
00037
00038 typedef int (* pspAudioThreadfunc_t)(int args, void *argp);
00039
00040 int pspAudioInit();
00041 void pspAudioEndPre();
00042 void pspAudioEnd();
00043
00044 void pspAudioSetVolume(int channel, int left, int right);
00045 void pspAudioChannelThreadCallback(int channel, void *buf, unsigned int reqn);
00046 void pspAudioSetChannelCallback(int channel, pspAudioCallback_t callback, void *pdata);
00047 int pspAudioOutBlocking(unsigned int channel, unsigned int vol1, unsigned int vol2, void *buf);
00048
00049 #ifdef __cplusplus
00050 }
00051 #endif
00052
00053 #endif