pspaudiolib.h

Go to the documentation of this file.
00001 /*
00002  * PSP Software Development Kit - http://www.pspdev.org
00003  * -----------------------------------------------------------------------
00004  * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
00005  *
00006  * pspaudiolib.h - Audio library build on top of sceAudio, but to provide
00007  *                 multiple thread usage and callbacks.
00008  *
00009  * Copyright (c) 2005 Adresd
00010  * Copyright (c) 2005 Marcus R. Brown <mrbrown@ocgnet.org>
00011  *
00012  * $Id: pspaudiolib.h 1874 2006-04-18 13:20:58Z tyranid $
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

Generated on Tue Jul 24 15:21:22 2007 for PSPSDK-Rev2272 by  doxygen 1.5.2