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  *
00013  * $Id: pspaudio.h 2271 2007-07-20 13:08:41Z oopo $
00014  */
00015 #ifndef PSPAUDIO_H
00016 #define PSPAUDIO_H
00017 
00018 #ifdef __cplusplus
00019 extern "C" {
00020 #endif
00021 
00027 
00029 #define PSP_AUDIO_VOLUME_MAX    0x8000
00030 
00032 #define PSP_AUDIO_CHANNEL_MAX   8
00033 
00034 #define PSP_AUDIO_NEXT_CHANNEL  (-1)
00035 
00036 enum PspAudioFormats {
00038     PSP_AUDIO_FORMAT_STEREO = 0,
00040     PSP_AUDIO_FORMAT_MONO   = 0x10
00041 };
00042 
00043 enum PspAudioFrequencies {
00045     PSP_AUDIO_FREQ_44K = 44100,
00047     PSP_AUDIO_FREQ_48K = 48000
00048 };
00049 
00051 #define PSP_AUDIO_SAMPLE_MIN    64
00052 
00053 #define PSP_AUDIO_SAMPLE_MAX    65472
00054 
00055 #define PSP_AUDIO_SAMPLE_ALIGN(s) (((s) + 63) & ~63)
00056  
00070 int sceAudioChReserve(int channel, int samplecount, int format);
00071 
00079 int sceAudioChRelease(int channel);
00080 
00081 
00082 int sceAudioOutput(int channel, int vol, void *buf);
00083 
00088 int sceAudioOutputBlocking(int channel, int vol, void *buf);
00089 
00094 int sceAudioOutputPanned(int channel, int leftvol, int rightvol, void *buffer);
00095 
00100 int sceAudioOutputPannedBlocking(int channel, int leftvol, int rightvol, void *buffer);
00101 
00106 int sceAudioGetChannelRestLen(int channel);
00107 
00112 int sceAudioSetChannelDataLen(int channel, int samplecount);
00113 
00118 int sceAudioChangeChannelConfig(int channel, int format);
00119 
00124 int sceAudioChangeChannelVolume(int channel, int leftvol, int rightvol);
00125 
00133 int sceAudioSetFrequency(int frequency);
00136 #ifdef __cplusplus
00137 }
00138 #endif
00139 
00140 #endif /* PSPAUDIO_H */

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