PSPSDK 2024-12-16
|
Go to the source code of this file.
Data Structures | |
struct | pspAudioInputParams |
Macros | |
#define | PSP_AUDIO_VOLUME_MAX 0x8000 |
The maximum output volume. | |
#define | PSP_AUDIO_CHANNEL_MAX 8 |
The maximum number of hardware channels. | |
#define | PSP_AUDIO_NEXT_CHANNEL (-1) |
Used to request the next available hardware channel. | |
#define | SCE_AUDIO_ERROR_NOT_INITIALIZED (0x80260001) |
Error codes used as return values for the Audio Driver. | |
#define | SCE_AUDIO_ERROR_OUTPUT_BUSY (0x80260002) |
#define | SCE_AUDIO_ERROR_INVALID_CH (0x80260003) |
#define | SCE_AUDIO_ERROR_PRIV_REQUIRED (0x80260004) |
#define | SCE_AUDIO_ERROR_NOT_FOUND (0x80260005) |
#define | SCE_AUDIO_ERROR_INVALID_SIZE (0x80260006) |
#define | SCE_AUDIO_ERROR_INVALID_FORMAT (0x80260007) |
#define | SCE_AUDIO_ERROR_NOT_RESERVED (0x80260008) |
#define | SCE_AUDIO_ERROR_NOT_OUTPUT (0x80260009) |
#define | SCE_AUDIO_ERROR_INVALID_FREQUENCY (0x8026000A) |
#define | SCE_AUDIO_ERROR_INVALID_VOLUME (0x8026000B) |
#define | SCE_AUDIO_ERROR_INPUT_BUSY (0x80260010) |
#define | PSP_AUDIO_SAMPLE_MIN 64 |
The minimum number of samples that can be allocated to a channel. | |
#define | PSP_AUDIO_SAMPLE_MAX 65472 |
The maximum number of samples that can be allocated to a channel. | |
#define | PSP_AUDIO_SAMPLE_ALIGN(s) (((s) + 63) & ~63) |
Make the given sample count a multiple of 64. | |
Enumerations | |
enum | PspAudioFormats { PSP_AUDIO_FORMAT_STEREO = 0 , PSP_AUDIO_FORMAT_MONO = 0x10 } |
Functions | |
int | sceAudioChReserve (int channel, int samplecount, int format) |
Allocate and initialize a hardware output channel. | |
int | sceAudioChRelease (int channel) |
Release a hardware output channel. | |
int | sceAudioOutput (int channel, int vol, void *buf) |
Output audio of the specified channel. | |
int | sceAudioOutputBlocking (int channel, int vol, void *buf) |
Output audio of the specified channel (blocking) | |
int | sceAudioOutputPanned (int channel, int leftvol, int rightvol, void *buf) |
Output panned audio of the specified channel. | |
int | sceAudioOutputPannedBlocking (int channel, int leftvol, int rightvol, void *buf) |
Output panned audio of the specified channel (blocking) | |
int | sceAudioGetChannelRestLen (int channel) |
Get count of unplayed samples remaining. | |
int | sceAudioGetChannelRestLength (int channel) |
Get count of unplayed samples remaining. | |
int | sceAudioSetChannelDataLen (int channel, int samplecount) |
Change the output sample count, after it's already been reserved. | |
int | sceAudioChangeChannelConfig (int channel, int format) |
Change the format of a channel. | |
int | sceAudioChangeChannelVolume (int channel, int leftvol, int rightvol) |
Change the volume of a channel. | |
int | sceAudioOutput2Reserve (int samplecount) |
Reserve the audio output and set the output sample count. | |
int | sceAudioOutput2Release (void) |
Release the audio output. | |
int | sceAudioOutput2ChangeLength (int samplecount) |
Change the output sample count, after it's already been reserved. | |
int | sceAudioOutput2OutputBlocking (int vol, void *buf) |
Output audio (blocking) | |
int | sceAudioOutput2GetRestSample (void) |
Get count of unplayed samples remaining. | |
int | sceAudioSRCChReserve (int samplecount, int freq, int channels) |
Reserve the audio output. | |
int | sceAudioSRCChRelease (void) |
Release the audio output. | |
int | sceAudioSRCOutputBlocking (int vol, void *buf) |
Output audio. | |
int | sceAudioInputInit (int unknown1, int gain, int unknown2) |
Init audio input. | |
int | sceAudioInputInitEx (pspAudioInputParams *params) |
Init audio input (with extra arguments) | |
int | sceAudioInputBlocking (int samplecount, int freq, void *buf) |
Perform audio input (blocking) | |
int | sceAudioInput (int samplecount, int freq, void *buf) |
Perform audio input. | |
int | sceAudioGetInputLength (void) |
Get the number of samples that were acquired. | |
int | sceAudioWaitInputEnd (void) |
Wait for non-blocking audio input to complete. | |
int | sceAudioPollInputEnd (void) |
Poll for non-blocking audio input status. | |
#define PSP_AUDIO_CHANNEL_MAX 8 |
The maximum number of hardware channels.
#define PSP_AUDIO_NEXT_CHANNEL (-1) |
Used to request the next available hardware channel.
Make the given sample count a multiple of 64.
#define PSP_AUDIO_SAMPLE_MAX 65472 |
The maximum number of samples that can be allocated to a channel.
#define PSP_AUDIO_SAMPLE_MIN 64 |
The minimum number of samples that can be allocated to a channel.
#define PSP_AUDIO_VOLUME_MAX 0x8000 |
The maximum output volume.
#define SCE_AUDIO_ERROR_INPUT_BUSY (0x80260010) |
#define SCE_AUDIO_ERROR_INVALID_CH (0x80260003) |
#define SCE_AUDIO_ERROR_INVALID_FORMAT (0x80260007) |
#define SCE_AUDIO_ERROR_INVALID_FREQUENCY (0x8026000A) |
#define SCE_AUDIO_ERROR_INVALID_SIZE (0x80260006) |
#define SCE_AUDIO_ERROR_INVALID_VOLUME (0x8026000B) |
#define SCE_AUDIO_ERROR_NOT_FOUND (0x80260005) |
#define SCE_AUDIO_ERROR_NOT_INITIALIZED (0x80260001) |
Error codes used as return values for the Audio Driver.
#define SCE_AUDIO_ERROR_NOT_OUTPUT (0x80260009) |
#define SCE_AUDIO_ERROR_NOT_RESERVED (0x80260008) |
#define SCE_AUDIO_ERROR_OUTPUT_BUSY (0x80260002) |
#define SCE_AUDIO_ERROR_PRIV_REQUIRED (0x80260004) |
Change the format of a channel.
channel | - The channel number. |
format | - One of PspAudioFormats |
Change the volume of a channel.
channel | - The channel number. |
leftvol | - The left volume. |
rightvol | - The right volume. |
Release a hardware output channel.
channel | - The channel to release. |
Referenced by pspAudioEnd(), and pspAudioInit().
Allocate and initialize a hardware output channel.
channel | - Use a value between 0 - 7 to reserve a specific channel. Pass PSP_AUDIO_NEXT_CHANNEL to get the first available channel. |
samplecount | - The number of samples that can be output on the channel per output call. It must be a value between PSP_AUDIO_SAMPLE_MIN and PSP_AUDIO_SAMPLE_MAX, and it must be aligned to 64 bytes (use the PSP_AUDIO_SAMPLE_ALIGN macro to align it). |
format | - The output format to use for the channel. One of PspAudioFormats. |
Referenced by pspAudioInit().
Get count of unplayed samples remaining.
channel | - The channel number. |
Get count of unplayed samples remaining.
channel | - The channel number. |
Get the number of samples that were acquired.
Perform audio input.
samplecount | - Number of samples. |
freq | - Either 44100, 22050 or 11025. |
buf | - Pointer to where the audio data will be stored. |
Perform audio input (blocking)
samplecount | - Number of samples. |
freq | - Either 44100, 22050 or 11025. |
buf | - Pointer to where the audio data will be stored. |
Init audio input.
unknown1 | - Unknown. Pass 0. |
gain | - Gain. |
unknown2 | - Unknown. Pass 0. |
int sceAudioInputInitEx | ( | pspAudioInputParams * | params | ) |
Init audio input (with extra arguments)
params | - A pointer to a pspAudioInputParams struct. |
Output audio of the specified channel.
channel | - The channel number. |
vol | - The volume. |
buf | - Pointer to the PCM data to output. |
Change the output sample count, after it's already been reserved.
samplecount | - The number of samples to output in one output call (min 17, max 4111). |
Get count of unplayed samples remaining.
Output audio (blocking)
vol | - The volume. |
buf | - Pointer to the PCM data. |
Release the audio output.
Reserve the audio output and set the output sample count.
samplecount | - The number of samples to output in one output call (min 17, max 4111). |
Output audio of the specified channel (blocking)
channel | - The channel number. |
vol | - The volume. |
buf | - Pointer to the PCM data to output. |
Output panned audio of the specified channel.
channel | - The channel number. |
leftvol | - The left volume. |
rightvol | - The right volume. |
buf | - Pointer to the PCM data to output. |
Output panned audio of the specified channel (blocking)
channel | - The channel number. |
leftvol | - The left volume. |
rightvol | - The right volume. |
buf | - Pointer to the PCM data to output. |
Referenced by pspAudioOutBlocking().
Poll for non-blocking audio input status.
Change the output sample count, after it's already been reserved.
channel | - The channel number. |
samplecount | - The number of samples to output in one output call. |
Release the audio output.
Reserve the audio output.
samplecount | - The number of samples to output in one output call (min 17, max 4111). |
freq | - The frequency. One of 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11050, 8000. |
channels | - Number of channels. Pass 2 (stereo). |
Output audio.
vol | - The volume. |
buf | - Pointer to the PCM data to output. |