Exports for User.
More...
|
| enum | SceAudioOutErrorCode {
SCE_AUDIO_OUT_ERROR_NOT_OPENED = 0x80260001
, SCE_AUDIO_OUT_ERROR_BUSY = 0x80260002
, SCE_AUDIO_OUT_ERROR_INVALID_PORT = 0x80260003
, SCE_AUDIO_OUT_ERROR_INVALID_POINTER = 0x80260004
,
SCE_AUDIO_OUT_ERROR_PORT_FULL = 0x80260005
, SCE_AUDIO_OUT_ERROR_INVALID_SIZE = 0x80260006
, SCE_AUDIO_OUT_ERROR_INVALID_FORMAT = 0x80260007
, SCE_AUDIO_OUT_ERROR_INVALID_SAMPLE_FREQ = 0x80260008
,
SCE_AUDIO_OUT_ERROR_INVALID_VOLUME = 0x80260009
, SCE_AUDIO_OUT_ERROR_INVALID_PORT_TYPE = 0x8026000A
, SCE_AUDIO_OUT_ERROR_INVALID_FX_TYPE = 0x8026000B
, SCE_AUDIO_OUT_ERROR_INVALID_CONF_TYPE = 0x8026000C
,
SCE_AUDIO_OUT_ERROR_OUT_OF_MEMORY = 0x8026000D
} |
| |
| enum | SceAudioOutParam { SCE_AUDIO_OUT_PARAM_FORMAT_S16_MONO = 0
, SCE_AUDIO_OUT_PARAM_FORMAT_S16_STEREO = 1
} |
| |
| enum | SceAudioOutPortType { SCE_AUDIO_OUT_PORT_TYPE_MAIN = 0
, SCE_AUDIO_OUT_PORT_TYPE_BGM = 1
, SCE_AUDIO_OUT_PORT_TYPE_VOICE = 2
} |
| |
| enum | SceAudioOutMode { SCE_AUDIO_OUT_MODE_MONO = 0
, SCE_AUDIO_OUT_MODE_STEREO = 1
} |
| |
| enum | SceAudioOutChannelFlag { SCE_AUDIO_VOLUME_FLAG_L_CH = 1
, SCE_AUDIO_VOLUME_FLAG_R_CH = 2
} |
| | Flags to use as 'ch' argument for sceAudioOutSetVolume. More...
|
| |
| enum | SceAudioOutConfigType { SCE_AUDIO_OUT_CONFIG_TYPE_LEN = 0
, SCE_AUDIO_OUT_CONFIG_TYPE_FREQ = 1
, SCE_AUDIO_OUT_CONFIG_TYPE_MODE = 2
} |
| | Config type values to specify to sceAudioOutGetConfig. More...
|
| |
| enum | SceAudioOutAlcMode { SCE_AUDIO_ALC_OFF = 0
, SCE_AUDIO_ALC_MODE1 = 1
, SCE_AUDIO_ALC_MODE_MAX = 2
} |
| | Argument 'mode' to specify to sceAudioOutSetAlcMode. More...
|
| |
|
| int | sceAudioOutOpenPort (SceAudioOutPortType type, int len, int freq, SceAudioOutMode mode) |
| | Initialize audio port.
|
| |
| int | sceAudioOutReleasePort (int port) |
| | Release an audio port.
|
| |
| 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.
|
| |
| int | sceAudioOutSetConfig (int port, SceSize len, int freq, SceAudioOutMode mode) |
| | Change configuration of specified output port.
|
| |
| int | sceAudioOutGetConfig (int port, SceAudioOutConfigType type) |
| | Get a parameter value of specified output port.
|
| |
| int | sceAudioOutSetAlcMode (SceAudioOutAlcMode mode) |
| | Set 'Automatic Level Control' mode on the BGM port ALC is also known as 'Dynamic Normalizer'.
|
| |
| int | sceAudioOutGetRestSample (int port) |
| | Get the number of remaining samples to be output on the specified port.
|
| |
| int | sceAudioOutGetAdopt (SceAudioOutPortType type) |
| | Get status of port type Return different value on whether the port type is used for sound generation or not.
|
| |
Exports for User.
Using this library in your project
Include the header file in your project:
Link the library to the executable:
◆ 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.