vitasdk
Documentation of the vitasdk
audioout.h
Go to the documentation of this file.
1 
7 #ifndef _PSP2_AUDIOOUT_H_
8 #define _PSP2_AUDIOOUT_H_
9 
10 #include <psp2/types.h>
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 typedef enum SceAudioOutErrorCode {
31 
32 typedef enum SceAudioOutParam {
36 
37 typedef enum SceAudioOutPortType {
45 
46 typedef enum SceAudioOutMode {
50 
51 #define SCE_AUDIO_MIN_LEN 64
52 #define SCE_AUDIO_MAX_LEN 65472
53 
54 #define SCE_AUDIO_OUT_MAX_VOL 32768
55 #define SCE_AUDIO_VOLUME_0DB SCE_AUDIO_OUT_MAX_VOL
56 
58 typedef enum SceAudioOutChannelFlag {
62 
64 typedef enum SceAudioOutConfigType {
69 
71 typedef enum SceAudioOutAlcMode {
76 
90 
98 int sceAudioOutReleasePort(int port);
99 
110 int sceAudioOutOutput(int port, const void *buf);
111 
121 int sceAudioOutSetVolume(int port, SceAudioOutChannelFlag ch, int *vol);
122 
134 int sceAudioOutSetConfig(int port, SceSize len, int freq, SceAudioOutMode mode);
135 
145 
155 
164 
174 
175 #ifdef __cplusplus
176 }
177 #endif
178 
179 #endif /* _PSP2_AUDIOOUT_H_ */
180 
SceAudioOutPortType
Definition: audioout.h:37
int sceAudioOutSetAlcMode(SceAudioOutAlcMode mode)
Set 'Automatic Level Control' mode on the BGM port ALC is also known as 'Dynamic Normalizer'.
int sceAudioOutSetConfig(int port, SceSize len, int freq, SceAudioOutMode mode)
Change configuration of specified output port.
int sceAudioOutReleasePort(int port)
Release an audio port.
SceAudioOutErrorCode
Definition: audioout.h:16
SceAudioOutConfigType
Config type values to specify to sceAudioOutGetConfig.
Definition: audioout.h:64
int sceAudioOutOutput(int port, const void *buf)
Output audio (blocking function)
int sceAudioOutSetVolume(int port, SceAudioOutChannelFlag ch, int *vol)
Set volume of specified output audio port.
SceAudioOutAlcMode
Argument 'mode' to specify to sceAudioOutSetAlcMode.
Definition: audioout.h:71
int sceAudioOutOpenPort(SceAudioOutPortType type, int len, int freq, SceAudioOutMode mode)
Initialize audio port.
int sceAudioOutGetAdopt(SceAudioOutPortType type)
Get status of port type Return different value on whether the port type is used for sound generation ...
SceAudioOutMode
Definition: audioout.h:46
int sceAudioOutGetRestSample(int port)
Get the number of remaining samples to be output on the specified port.
int sceAudioOutGetConfig(int port, SceAudioOutConfigType type)
Get a parameter value of specified output port.
SceAudioOutChannelFlag
Flags to use as 'ch' argument for sceAudioOutSetVolume.
Definition: audioout.h:58
SceAudioOutParam
Definition: audioout.h:32
@ SCE_AUDIO_OUT_PORT_TYPE_VOICE
Used for voice chat port.
Definition: audioout.h:43
@ SCE_AUDIO_OUT_PORT_TYPE_BGM
Used for Background Music port.
Definition: audioout.h:41
@ SCE_AUDIO_OUT_PORT_TYPE_MAIN
Used for main audio output, freq must be set to 48000 Hz.
Definition: audioout.h:39
@ SCE_AUDIO_OUT_ERROR_INVALID_VOLUME
Definition: audioout.h:25
@ SCE_AUDIO_OUT_ERROR_INVALID_CONF_TYPE
Definition: audioout.h:28
@ SCE_AUDIO_OUT_ERROR_NOT_OPENED
Definition: audioout.h:17
@ SCE_AUDIO_OUT_ERROR_INVALID_FX_TYPE
Definition: audioout.h:27
@ SCE_AUDIO_OUT_ERROR_OUT_OF_MEMORY
Definition: audioout.h:29
@ SCE_AUDIO_OUT_ERROR_BUSY
Definition: audioout.h:18
@ SCE_AUDIO_OUT_ERROR_INVALID_SIZE
Definition: audioout.h:22
@ SCE_AUDIO_OUT_ERROR_INVALID_PORT_TYPE
Definition: audioout.h:26
@ SCE_AUDIO_OUT_ERROR_INVALID_PORT
Definition: audioout.h:19
@ SCE_AUDIO_OUT_ERROR_INVALID_SAMPLE_FREQ
Definition: audioout.h:24
@ SCE_AUDIO_OUT_ERROR_INVALID_FORMAT
Definition: audioout.h:23
@ SCE_AUDIO_OUT_ERROR_PORT_FULL
Definition: audioout.h:21
@ SCE_AUDIO_OUT_ERROR_INVALID_POINTER
Definition: audioout.h:20
@ SCE_AUDIO_OUT_CONFIG_TYPE_FREQ
Definition: audioout.h:66
@ SCE_AUDIO_OUT_CONFIG_TYPE_LEN
Definition: audioout.h:65
@ SCE_AUDIO_OUT_CONFIG_TYPE_MODE
Definition: audioout.h:67
@ SCE_AUDIO_ALC_MODE1
Definition: audioout.h:73
@ SCE_AUDIO_ALC_MODE_MAX
Definition: audioout.h:74
@ SCE_AUDIO_ALC_OFF
Definition: audioout.h:72
@ SCE_AUDIO_OUT_MODE_MONO
Definition: audioout.h:47
@ SCE_AUDIO_OUT_MODE_STEREO
Definition: audioout.h:48
@ SCE_AUDIO_VOLUME_FLAG_R_CH
Right Channel.
Definition: audioout.h:60
@ SCE_AUDIO_VOLUME_FLAG_L_CH
Left Channel.
Definition: audioout.h:59
@ SCE_AUDIO_OUT_PARAM_FORMAT_S16_STEREO
Definition: audioout.h:34
@ SCE_AUDIO_OUT_PARAM_FORMAT_S16_MONO
Definition: audioout.h:33
uint8_t type
0 = read?, 1 = write?, 2 = feature?, 3 = ?
Definition: bt.h:2
unsigned int SceSize
Definition: types.h:56