Exports for User.
Using this library in your project
Include the header file in your project:
Link the library to the executable:
|
int | sceAudioOutOpenPort (SceAudioOutPortType type, int len, int freq, SceAudioOutMode mode) |
| Initialize audio port. More...
|
|
int | sceAudioOutReleasePort (int port) |
| Release an audio port. More...
|
|
int | sceAudioOutOutput (int port, const void *buf) |
| Output audio (blocking function) More...
|
|
int | sceAudioOutSetVolume (int port, SceAudioOutChannelFlag ch, int *vol) |
| Set volume of specified output audio port. More...
|
|
int | sceAudioOutSetConfig (int port, SceSize len, int freq, SceAudioOutMode mode) |
| Change configuration of specified output port. More...
|
|
int | sceAudioOutGetConfig (int port, SceAudioOutConfigType type) |
| Get a parameter value of specified output port. More...
|
|
int | sceAudioOutSetAlcMode (SceAudioOutAlcMode mode) |
| Set 'Automatic Level Control' mode on the BGM port ALC is also known as 'Dynamic Normalizer'. More...
|
|
int | sceAudioOutGetRestSample (int port) |
| Get the number of remaining samples to be output on the specified port. More...
|
|
int | sceAudioOutGetAdopt (SceAudioOutPortType type) |
| Get status of port type Return different value on whether the port type is used for sound generation or not. More...
|
|
◆ SCE_AUDIO_MIN_LEN
#define SCE_AUDIO_MIN_LEN 64 |
◆ SCE_AUDIO_MAX_LEN
#define SCE_AUDIO_MAX_LEN 65472 |
◆ SCE_AUDIO_OUT_MAX_VOL
#define SCE_AUDIO_OUT_MAX_VOL 32768 |
Maximum output port volume.
◆ SCE_AUDIO_VOLUME_0DB
Maximum output port volume.
◆ SceAudioOutErrorCode
Enumerator |
---|
SCE_AUDIO_OUT_ERROR_NOT_OPENED | |
SCE_AUDIO_OUT_ERROR_BUSY | |
SCE_AUDIO_OUT_ERROR_INVALID_PORT | |
SCE_AUDIO_OUT_ERROR_INVALID_POINTER | |
SCE_AUDIO_OUT_ERROR_PORT_FULL | |
SCE_AUDIO_OUT_ERROR_INVALID_SIZE | |
SCE_AUDIO_OUT_ERROR_INVALID_FORMAT | |
SCE_AUDIO_OUT_ERROR_INVALID_SAMPLE_FREQ | |
SCE_AUDIO_OUT_ERROR_INVALID_VOLUME | |
SCE_AUDIO_OUT_ERROR_INVALID_PORT_TYPE | |
SCE_AUDIO_OUT_ERROR_INVALID_FX_TYPE | |
SCE_AUDIO_OUT_ERROR_INVALID_CONF_TYPE | |
SCE_AUDIO_OUT_ERROR_OUT_OF_MEMORY | |
◆ SceAudioOutParam
Enumerator |
---|
SCE_AUDIO_OUT_PARAM_FORMAT_S16_MONO | |
SCE_AUDIO_OUT_PARAM_FORMAT_S16_STEREO | |
◆ SceAudioOutPortType
Enumerator |
---|
SCE_AUDIO_OUT_PORT_TYPE_MAIN | Used for main audio output, freq must be set to 48000 Hz.
|
SCE_AUDIO_OUT_PORT_TYPE_BGM | Used for Background Music port.
|
SCE_AUDIO_OUT_PORT_TYPE_VOICE | Used for voice chat port.
|
◆ SceAudioOutMode
Enumerator |
---|
SCE_AUDIO_OUT_MODE_MONO | |
SCE_AUDIO_OUT_MODE_STEREO | |
◆ SceAudioOutChannelFlag
Flags to use as 'ch' argument for sceAudioOutSetVolume.
Enumerator |
---|
SCE_AUDIO_VOLUME_FLAG_L_CH | Left Channel.
|
SCE_AUDIO_VOLUME_FLAG_R_CH | Right Channel.
|
◆ SceAudioOutConfigType
Config type values to specify to sceAudioOutGetConfig.
Enumerator |
---|
SCE_AUDIO_OUT_CONFIG_TYPE_LEN | |
SCE_AUDIO_OUT_CONFIG_TYPE_FREQ | |
SCE_AUDIO_OUT_CONFIG_TYPE_MODE | |
◆ SceAudioOutAlcMode
Argument 'mode' to specify to sceAudioOutSetAlcMode.
Enumerator |
---|
SCE_AUDIO_ALC_OFF | |
SCE_AUDIO_ALC_MODE1 | |
SCE_AUDIO_ALC_MODE_MAX | |
◆ sceAudioOutOpenPort()
Initialize audio port.
- Parameters
-
[in] | type | - One of SceAudioOutPortType |
[in] | len | - Number of samples, between SCE_AUDIO_MIN_LEN and SCE_AUDIO_MAX_LEN (multiple of 64) |
[in] | freq | - Sampling frequency (in Hz), one of the followings : 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 |
[in] | mode | - One of SceAudioOutMode |
- Returns
- port number, < 0 on error.
- Note
- - The volume is initially set to its max value (SCE_AUDIO_OUT_MAX_VOL)
◆ sceAudioOutReleasePort()
int sceAudioOutReleasePort |
( |
int |
port | ) |
|
Release an audio port.
- Parameters
-
- Returns
- 0 on success, < 0 on error.
◆ sceAudioOutOutput()
int sceAudioOutOutput |
( |
int |
port, |
|
|
const void * |
buf |
|
) |
| |
Output audio (blocking function)
- Parameters
-
- Returns
- 0 on success, < 0 on error.
- Note
- - if NULL is specified for *buf, the function will not return until the last output audio data has been output.
◆ sceAudioOutSetVolume()
Set volume of specified output audio port.
- Parameters
-
[in] | port | - Port number returned by sceAudioOutOpenPort |
[in] | ch | - Channel numbers as flags (see SceAudioOutChannelFlag) |
[in] | *vol | - Array to int specifying volume for each channel (Left channel first for stereo) |
- Returns
- 0 on success, < 0 on error.
◆ sceAudioOutSetConfig()
Change configuration of specified output port.
- Parameters
-
- Returns
- 0 on success, < 0 on error.
- Note
- - If (-1) is specified for any argument (excepted for port), current configuration is used instead.
◆ sceAudioOutGetConfig()
Get a parameter value of specified output port.
- Parameters
-
- Returns
- 0 on success, < 0 on error.
◆ sceAudioOutSetAlcMode()
Set 'Automatic Level Control' mode on the BGM port ALC is also known as 'Dynamic Normalizer'.
- Parameters
-
- Returns
- 0 on success, < 0 on error.
◆ sceAudioOutGetRestSample()
int sceAudioOutGetRestSample |
( |
int |
port | ) |
|
Get the number of remaining samples to be output on the specified port.
- Parameters
-
- Returns
- Number of samples on success, < 0 on error.
◆ sceAudioOutGetAdopt()
Get status of port type Return different value on whether the port type is used for sound generation or not.
- Parameters
-
- Returns
- (1) if port is in use, (0) otherwise. < 0 on error.