pspaudio.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  * pspaudio.h - Prototypes for the sceAudio library.
00007  *
00008  * Copyright (c) 2005 Adresd
00009  * Copyright (c) 2005 Marcus R. Brown <mrbrown@ocgnet.org>
00010  * Copyright (c) 2007 cooleyes
00011  * Copyright (c) 2007 Alexander Berl <raphael@fx-world.org>
00012  * Copyright (c) 2008 David Perry <tias_dp@hotmail.com>
00013  *
00014  * $Id: pspaudio.h 2433 2008-10-15 10:00:27Z iwn $
00015  */
00016 #ifndef PSPAUDIO_H
00017 #define PSPAUDIO_H
00018 
00019 #ifdef __cplusplus
00020 extern "C" {
00021 #endif
00022 
00028 
00030 #define PSP_AUDIO_VOLUME_MAX    0x8000
00031 
00033 #define PSP_AUDIO_CHANNEL_MAX   8
00034 
00036 #define PSP_AUDIO_NEXT_CHANNEL  (-1)
00037 
00038 enum PspAudioFormats
00039 {
00041     PSP_AUDIO_FORMAT_STEREO = 0,
00043     PSP_AUDIO_FORMAT_MONO   = 0x10
00044 };
00045 
00046 typedef struct
00047 {
00049         int unknown1;
00050         int gain;
00052         int unknown2;
00054         int unknown3;
00056         int unknown4;
00058         int unknown5;
00059         
00060 } pspAudioInputParams;
00061 
00063 #define PSP_AUDIO_SAMPLE_MIN    64
00064 
00066 #define PSP_AUDIO_SAMPLE_MAX    65472
00067 
00069 #define PSP_AUDIO_SAMPLE_ALIGN(s) (((s) + 63) & ~63)
00070  
00084 int sceAudioChReserve(int channel, int samplecount, int format);
00085 
00093 int sceAudioChRelease(int channel);
00094 
00106 int sceAudioOutput(int channel, int vol, void *buf);
00107 
00119 int sceAudioOutputBlocking(int channel, int vol, void *buf);
00120 
00134 int sceAudioOutputPanned(int channel, int leftvol, int rightvol, void *buf);
00135 
00149 int sceAudioOutputPannedBlocking(int channel, int leftvol, int rightvol, void *buf);
00150 
00158 int sceAudioGetChannelRestLen(int channel);
00159 
00167 int sceAudioGetChannelRestLength(int channel);
00168 
00177 int sceAudioSetChannelDataLen(int channel, int samplecount);
00178 
00188 int sceAudioChangeChannelConfig(int channel, int format);
00189 
00201 int sceAudioChangeChannelVolume(int channel, int leftvol, int rightvol);
00202 
00203 //sceAudioOneshotOutput ???
00204 
00212 int sceAudioOutput2Reserve(int samplecount);
00213 
00219 int sceAudioOutput2Release(void);
00220 
00228 int sceAudioOutput2ChangeLength(int samplecount);
00229 
00239 int sceAudioOutput2OutputBlocking(int vol, void *buf);
00240 
00246 int sceAudioOutput2GetRestSample(void);
00247 
00259 int sceAudioSRCChReserve(int samplecount, int freq, int channels);
00260 
00266 int sceAudioSRCChRelease(void);
00267 
00277 int sceAudioSRCOutputBlocking(int vol, void *buf);
00278 
00290 int sceAudioInputInit(int unknown1, int gain, int unknown2);
00291 
00299 int sceAudioInputInitEx(pspAudioInputParams *params);
00300 
00312 int sceAudioInputBlocking(int samplecount, int freq, void *buf);
00313 
00325 int sceAudioInput(int samplecount, int freq, void *buf);
00326 
00332 int sceAudioGetInputLength(void);
00333 
00339 int sceAudioWaitInputEnd(void);
00340 
00346 int sceAudioPollInputEnd(void);
00347 
00350 #ifdef __cplusplus
00351 }
00352 #endif
00353 
00354 #endif /* PSPAUDIO_H */

Generated on Tue Sep 7 07:00:26 2010 for pspsdk-1.0+beta2 by  doxygen 1.5.6