PSP2SDK
dirty-f9e4f2d
The free SDK for PSP2
|
00001 00012 #ifndef _PSP2_AUDIOOUT_H_ 00013 #define _PSP2_AUDIOOUT_H_ 00014 00015 #ifdef __cplusplus 00016 extern "C" { 00017 #endif 00018 00019 enum { 00020 SCE_AUDIO_OUT_ERROR_NOT_OPENED = 0x80260001, 00021 SCE_AUDIO_OUT_ERROR_BUSY = 0x80260002, 00022 SCE_AUDIO_OUT_ERROR_INVALID_PORT = 0x80260003, 00023 SCE_AUDIO_OUT_ERROR_INVALID_POINTER = 0x80260004, 00024 SCE_AUDIO_OUT_ERROR_PORT_FULL = 0x80260005, 00025 SCE_AUDIO_OUT_ERROR_INVALID_SIZE = 0x80260006, 00026 SCE_AUDIO_OUT_ERROR_INVALID_FORMAT = 0x80260007, 00027 SCE_AUDIO_OUT_ERROR_INVALID_SAMPLE_FREQ = 0x80260008, 00028 SCE_AUDIO_OUT_ERROR_INVALID_VOLUME = 0x80260009, 00029 SCE_AUDIO_OUT_ERROR_INVALID_PORT_TYPE = 0x8026000A, 00030 SCE_AUDIO_OUT_ERROR_INVALID_FX_TYPE = 0x8026000B, 00031 SCE_AUDIO_OUT_ERROR_INVALID_CONF_TYPE = 0x8026000C, 00032 SCE_AUDIO_OUT_ERROR_OUT_OF_MEMORY = 0x8026000D 00033 }; 00034 00035 enum { 00037 PSP2_AUDIO_OUT_PORT_TYPE_MAIN = 0, 00038 00040 PSP2_AUDIO_OUT_PORT_TYPE_BGM = 1, 00041 00043 PSP2_AUDIO_OUT_PORT_TYPE_VOICE = 2 00044 }; 00045 00046 enum { 00047 PSP2_AUDIO_OUT_MODE_MONO = 0, 00048 PSP2_AUDIO_OUT_MODE_STEREO = 1 00049 }; 00050 00051 #define PSP2_AUDIO_MIN_LEN 64 //!< Minimum granularity 00052 #define PSP2_AUDIO_MAX_LEN 65472 //!< Maximum granularity 00053 00066 int sceAudioOutOpenPort(int type, int len, int freq, int mode); 00067 00075 int sceAudioOutReleasePort(int port); 00076 00087 int sceAudioOutOutput(int port, const void *buf); 00088 00089 #define PSP2_AUDIO_OUT_MAX_VOL 32768 //!< Maximum output port volume 00090 #define PSP2_AUDIO_VOLUME_0DB PSP2_AUDIO_OUT_MAX_VOL //!< Maximum output port volume 00091 00093 enum { 00094 PSP2_AUDIO_VOLUME_FLAG_L_CH = 0x1, 00095 PSP2_AUDIO_VOLUME_FLAG_R_CH = 0x2 00096 }; 00097 00107 int sceAudioOutSetVolume(int port, int ch, int *vol); 00108 00120 int sceAudioOutSetConfig(int port, int len, int freq, int mode); 00121 00123 enum { 00124 PSP2_AUDIO_OUT_CONFIG_TYPE_LEN = 0, 00125 PSP2_AUDIO_OUT_CONFIG_TYPE_FREQ = 1, 00126 PSP2_AUDIO_OUT_CONFIG_TYPE_MODE = 2 00127 }; 00128 00137 int sceAudioOutGetConfig(int port, int type); 00138 00140 enum { 00141 PSP2_AUDIO_ALC_OFF = 0, 00142 PSP2_AUDIO_ALC_MODE1 = 1, 00143 PSP2_AUDIO_ALC_MODE_MAX = 2 00144 }; 00145 00154 int sceAudioOutSetAlcMode(int mode); 00155 00163 int sceAudioOutGetRestSample(int port); 00164 00173 int sceAudioOutGetAdopt(int type); 00174 00175 #ifdef __cplusplus 00176 } 00177 #endif 00178 00179 #endif /* _PSP2_AUDIOOUT_H_ */