Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals

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 1095 2005-09-27 21:02:16Z jim $
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 #define PSP_NUM_AUDIO_SAMPLES 1024
00023 #define PSP_VOLUME_MAX 0x8000
00024 
00025 typedef struct {
00026   int threadhandle;
00027   int handle;
00028   int volumeleft;
00029   int volumeright;
00030   void (*callback)(void *buf, unsigned int reqn);
00031 } psp_audio_channelinfo;
00032 
00033 typedef int (* pspAudioThreadfunc_t)(int args, void *argp);
00034 
00035 int  pspAudioInit();
00036 void pspAudioEndPre();
00037 void pspAudioEnd();
00038 
00039 void pspAudioSetVolume(int channel, int left, int right);
00040 void pspAudioChannelThreadCallback(int channel, void *buf, unsigned int reqn);
00041 void pspAudioSetChannelCallback(int channel, void *callback);
00042 int  pspAudioOutBlocking(unsigned int channel, unsigned int vol1, unsigned int vol2, void *buf);
00043 
00044 #ifdef __cplusplus
00045 }
00046 #endif
00047 
00048 #endif

Generated on Wed Sep 28 07:52:08 2005 for pspsdk-1.0+beta by  doxygen 1.4.4