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

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  *
00011  * $Id: pspaudio.h 1095 2005-09-27 21:02:16Z jim $
00012  */
00013 #ifndef PSPAUDIO_H
00014 #define PSPAUDIO_H
00015 
00016 #ifdef __cplusplus
00017 extern "C" {
00018 #endif
00019 
00025 
00027 #define PSP_AUDIO_VOLUME_MAX    0x8000
00028 
00030 #define PSP_AUDIO_CHANNEL_MAX   8
00031 
00032 #define PSP_AUDIO_NEXT_CHANNEL  (-1)
00033 
00034 enum PspAudioFormats {
00036     PSP_AUDIO_FORMAT_STEREO = 0,
00038     PSP_AUDIO_FORMAT_MONO   = 0x10
00039 };
00040 
00042 #define PSP_AUDIO_SAMPLE_MIN    64
00043 
00044 #define PSP_AUDIO_SAMPLE_MAX    65472
00045 
00046 #define PSP_AUDIO_SAMPLE_ALIGN(s) (((s) + 63) & ~63)
00047  
00061 int sceAudioChReserve(int channel, int samplecount, int format);
00062 
00070 int sceAudioChRelease(int channel);
00071 
00072 
00073 int sceAudioOutput(int channel, int vol, void *buf);
00074 
00079 int sceAudioOutputBlocking(int channel, int vol, void *buf);
00080 
00085 int sceAudioOutputPanned(int channel, int leftvol, int rightvol, void *buffer);
00086 
00091 int sceAudioOutputPannedBlocking(int channel, int leftvol, int rightvol, void *buffer);
00092 
00097 int sceAudioGetChannelRestLen(int channel);
00098 
00103 int sceAudioSetChannelDataLen(int channel, int samplecount);
00104 
00109 int sceAudioChangeChannelConfig(int channel, int format);
00110 
00115 int sceAudioChangeChannelVolume(int channel, int leftvol, int rightvol);
00116 
00119 #ifdef __cplusplus
00120 }
00121 #endif
00122 
00123 #endif /* PSPAUDIO_H */

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