PSP2SDK
dirty-f9e4f2d
The free SDK for PSP2
|
Header file which defines output audio related variables and functions. More...
Go to the source code of this file.
Defines | |
#define | PSP2_AUDIO_MIN_LEN 64 |
Minimum granularity. | |
#define | PSP2_AUDIO_MAX_LEN 65472 |
Maximum granularity. | |
#define | PSP2_AUDIO_OUT_MAX_VOL 32768 |
Maximum output port volume. | |
#define | PSP2_AUDIO_VOLUME_0DB PSP2_AUDIO_OUT_MAX_VOL |
Maximum output port volume. | |
Enumerations | |
enum | { 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 | { PSP2_AUDIO_OUT_PORT_TYPE_MAIN = 0, PSP2_AUDIO_OUT_PORT_TYPE_BGM = 1, PSP2_AUDIO_OUT_PORT_TYPE_VOICE = 2 } |
enum | { PSP2_AUDIO_OUT_MODE_MONO = 0, PSP2_AUDIO_OUT_MODE_STEREO = 1 } |
enum | { PSP2_AUDIO_VOLUME_FLAG_L_CH = 0x1, PSP2_AUDIO_VOLUME_FLAG_R_CH = 0x2 } |
enum | { PSP2_AUDIO_OUT_CONFIG_TYPE_LEN = 0, PSP2_AUDIO_OUT_CONFIG_TYPE_FREQ = 1, PSP2_AUDIO_OUT_CONFIG_TYPE_MODE = 2 } |
enum | { PSP2_AUDIO_ALC_OFF = 0, PSP2_AUDIO_ALC_MODE1 = 1, PSP2_AUDIO_ALC_MODE_MAX = 2 } |
Functions | |
int | sceAudioOutOpenPort (int type, int len, int freq, int mode) |
int | sceAudioOutReleasePort (int port) |
int | sceAudioOutOutput (int port, const void *buf) |
int | sceAudioOutSetVolume (int port, int ch, int *vol) |
int | sceAudioOutSetConfig (int port, int len, int freq, int mode) |
int | sceAudioOutGetConfig (int port, int type) |
int | sceAudioOutSetAlcMode (int mode) |
int | sceAudioOutGetRestSample (int port) |
int | sceAudioOutGetAdopt (int type) |
Header file which defines output audio related variables and functions.
Copyright (C) 2015 PSP2SDK Project
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
anonymous enum |
anonymous enum |
Flags to use as 'ch' argument for sceAudioOutSetVolume
anonymous enum |
Config type values to specify to sceAudioOutGetConfig
anonymous enum |
Argument 'mode' to specify to sceAudioOutSetAlcMode
int sceAudioOutGetAdopt | ( | int | type | ) |
Get status of port type Return different value on whether the port type is used for sound generation or not.
[in] | type | - One of ::AudioOutPortType |
int sceAudioOutGetConfig | ( | int | port, |
int | type | ||
) |
Get a parameter value of specified output port
[in] | port | - Port number returned by sceAudioOutOpenPort |
[in] | type | - One of ::AudioOutConfigType |
int sceAudioOutGetRestSample | ( | int | port | ) |
Get the number of remaining samples to be output on the specified port
[in] | port | - Port number returned by sceAudioOutOpenPort |
int sceAudioOutOpenPort | ( | int | type, |
int | len, | ||
int | freq, | ||
int | mode | ||
) |
Initialize audio port
[in] | type | - One of ::AudioOutPortType |
[in] | len | - Number of samples, between PSP2_AUDIO_MIN_LEN and PSP2_AUDIO_MAX_LEN (multiple of 64) |
[in] | freq | - Samping frequency (in Hz), one of the followings : 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 |
[in] | mode | - One of ::AudioOutMode |
int sceAudioOutOutput | ( | int | port, |
const void * | buf | ||
) |
Output audio (blocking function)
[in] | port | - Port number returned by sceAudioOutOpenPort |
[in] | *buf | : Pointer to audio data buffer |
int sceAudioOutReleasePort | ( | int | port | ) |
Release an audio port
[in] | type | - Port number returned by sceAudioOutOpenPort |
int sceAudioOutSetAlcMode | ( | int | mode | ) |
Set 'Automatic Level Control' mode on the BGM port ALC is also known as 'Dynamic Normalizer'
[in] | mode | - One of |
int sceAudioOutSetConfig | ( | int | port, |
int | len, | ||
int | freq, | ||
int | mode | ||
) |
Change configuration of specified output port
[in] | port | - Port number returned by sceAudioOutOpenPort |
[in] | len | - see sceAudioOutOpenPort() |
[in] | freq | - see sceAudioOutOpenPort() |
[in] | mode | - see sceAudioOutOpenPort() |
int sceAudioOutSetVolume | ( | int | port, |
int | ch, | ||
int * | vol | ||
) |
Set volume of specified output audio port
[in] | port | - Port number returned by sceAudioOutOpenPort |
[in] | ch | - Channel numbers as flags (see ::AudioOutChannelFlag) |
[in] | *vol | - Array to int specifying volume for each channel (Left channel first for stereo) |