uOFW
Reverse engineered PSP kernel 6.60.
Loading...
Searching...
No Matches
Data Structures | Functions
Audio Module

Data Structures

struct  SceAudioInputParams
 

Functions

int sceAudioOutput (u32 chanId, int vol, void *buf)
 
int sceAudioOutputBlocking (u32 chanId, int vol, void *buf)
 
int sceAudioOutputPanned (u32 chanId, int leftVol, int rightVol, void *buf)
 
int sceAudioOutputPannedBlocking (u32 chanId, int leftVol, int rightVol, void *buf)
 
int sceAudioChReserve (int channel, int sampleCount, int format)
 
int sceAudioOneshotOutput (int chanId, int sampleCount, int fmt, int leftVol, int rightVol, void *buf)
 
int sceAudioChRelease (u32 channel)
 
int sceAudioGetChannelRestLength (u32 chanId)
 
int sceAudioSetChannelDataLen (u32 chanId, int sampleCount)
 
int sceAudioChangeChannelVolume (u32 chanId, int leftVol, int rightVol)
 
int sceAudioChangeChannelConfig (u32 chanId, int format)
 
int sceAudioOutput2ChangeLength (int sampleCount)
 
int sceAudioOutput2GetRestSample (void)
 
int sceAudioGetChannelRestLen (u32 chanId)
 
int sceAudioOutput2Reserve (int sampleCount)
 
int sceAudioOutput2OutputBlocking (int vol, void *buf)
 
int sceAudioOutput2Release (void)
 
int sceAudioSetFrequency (int freq)
 
int sceAudioInit ()
 
int sceAudioLoopbackTest (int arg0)
 
int sceAudioEnd ()
 
int sceAudio_driver_FF298CE7 (int arg)
 
int sceAudioSetVolumeOffset (int arg)
 
int sceAudioSRCChReserve (int sampleCount, int freq, int numChans)
 
int sceAudioSRCChRelease (void)
 
int sceAudioSRCOutputBlocking (int vol, void *buf)
 
int sceAudioWaitInputEnd ()
 
int sceAudioInputInitEx (SceAudioInputParams *param)
 
int sceAudioInputInit (int arg0, int gain, int arg2)
 
int sceAudioInputBlocking (int sampleCount, int freq, void *buf)
 
int sceAudioInput (int sampleCount, int freq, void *buf)
 
int sceAudioGetInputLength ()
 
int sceAudioPollInputEnd ()
 
int sceAudio_driver_5182B550 (int arg)
 

Detailed Description

Author
artart78
Version
6.60

The audio.prx module RE'ing.

Function Documentation

◆ sceAudioOutput()

int sceAudioOutput ( u32  chanId,
int  vol,
void *  buf 
)

Outputs audio (raw PCM) to channel.

Parameters
chanIdThe channel ID, returned by sceAudioChReserve().
volThe volume (0 - 0xFFFF).
bufThe PCM buffer to output.
Returns
The sample count in case of success, otherwise less than zero.

◆ sceAudioOutputBlocking()

int sceAudioOutputBlocking ( u32  chanId,
int  vol,
void *  buf 
)

Outputs audio (raw PCM) to channel and doesn't return until everything has been played.

Parameters
chanIdThe channel ID, returned by sceAudioChReserve().
volThe volume (0 - 0xFFFF).
bufThe PCM buffer to output.
Returns
The sample count in case of success, otherwise less than zero.

◆ sceAudioOutputPanned()

int sceAudioOutputPanned ( u32  chanId,
int  leftVol,
int  rightVol,
void *  buf 
)

Outputs audio (raw PCM) to channel with different left and right volumes.

Parameters
chanIdThe channel ID, returned by sceAudioChReserve().
leftVolThe left volume (0 - 0xFFFF).
rightVolThe right volume (0 - 0xFFFF).
bufThe PCM buffer to output.
Returns
The sample count in case of success, otherwise less than zero.

◆ sceAudioOutputPannedBlocking()

int sceAudioOutputPannedBlocking ( u32  chanId,
int  leftVol,
int  rightVol,
void *  buf 
)

Outputs audio (raw PCM) to channel with different left and right volumes. The function doesn't return until the entire buffer has been played.

Parameters
chanIdThe channel ID, returned by sceAudioChReserve().
leftVolThe left volume (0 - 0xFFFF).
rightVolThe right volume (0 - 0xFFFF).
bufThe PCM buffer to output.
Returns
The sample count in case of success, otherwise less than zero.

◆ sceAudioChReserve()

int sceAudioChReserve ( int  channel,
int  sampleCount,
int  format 
)

Reserves a channel.

Parameters
channelThe channel ID you want to reserve, or -1 if you want the first free one to be selected.
sampleCountThe number of samples.
formatThe audio format (0x10 for MONO, 0 for STEREO)
Returns
The channel ID in case of success, otherwise less than zero.

◆ sceAudioOneshotOutput()

int sceAudioOneshotOutput ( int  chanId,
int  sampleCount,
int  fmt,
int  leftVol,
int  rightVol,
void *  buf 
)

Reserves the channel & outputs in "one shot"

Parameters
chanIdThe channel ID, or -1 if you want the first free channel to be chose.
sampleCountThe number of samples to play.
fmtThe audio format (0x10 for MONO, 0 for STEREO)
leftVolThe left ear volume (0 - 0xFFFF).
rightVolThe right ear volume (0 - 0xFFFF).
bufThe PCM audio buffer.
Returns
The channel ID in case of success, otherwise less than zero.

◆ sceAudioChRelease()

int sceAudioChRelease ( u32  channel)

Releases a channel.

Parameters
channelThe channel ID to release.
Returns
0 in case of succes, otherwise less than zero.

◆ sceAudioGetChannelRestLength()

int sceAudioGetChannelRestLength ( u32  chanId)

Get the number of remaining unplayed samples of a channel.

Parameters
chanIdThe channel ID to check.
Returns
The number of remaining samples.

◆ sceAudioSetChannelDataLen()

int sceAudioSetChannelDataLen ( u32  chanId,
int  sampleCount 
)

Set the sample count of a channel.

Parameters
chanIdThe channel ID.
sampleCountThe number of samples.
Returns
0 on success, otherwise less than zero.

◆ sceAudioChangeChannelVolume()

int sceAudioChangeChannelVolume ( u32  chanId,
int  leftVol,
int  rightVol 
)

Change the volume of a channel.

Parameters
chanIdThe channel ID.
leftVolThe left ear volume.
rightVolThe right ear volume.
Returns
0 on success, otherwise less than 0

◆ sceAudioChangeChannelConfig()

int sceAudioChangeChannelConfig ( u32  chanId,
int  format 
)

Change the format (mono/stereo) of a channel.

Parameters
chanIdThe channel ID.
formatThe audio format (0 for STEREO, 0x10 for MONO).
Returns
0 on success, otherwise less than 0

◆ sceAudioOutput2ChangeLength()

int sceAudioOutput2ChangeLength ( int  sampleCount)

Change SRC output sample count.

Parameters
sampleCountThe sample count.
Returns
0 on success, otherwise less than zero.

◆ sceAudioOutput2GetRestSample()

int sceAudioOutput2GetRestSample ( void  )

Get the number of SRC unplayed samples.

Returns
The number of unplayed samples.

◆ sceAudioGetChannelRestLen()

int sceAudioGetChannelRestLen ( u32  chanId)

Get the number of unplayed samples of a channel.

Parameters
chanIdThe channel ID.
Returns
The number of samples in case of success, otherwise less than zero.

◆ sceAudioOutput2Reserve()

int sceAudioOutput2Reserve ( int  sampleCount)

Reserve a SRC output.

Parameters
sampleCountThe number of samples of the output.
Returns
0 in case of success, otherwise less than zero.

◆ sceAudioOutput2OutputBlocking()

int sceAudioOutput2OutputBlocking ( int  vol,
void *  buf 
)

Output to SRC. This function only returns when all the samples have been played.

Parameters
volThe output volume.
bufThe PCM audio buffer.
Returns
The sample count on success, otherwise less than zero.

◆ sceAudioOutput2Release()

int sceAudioOutput2Release ( void  )

Release SRC output.

Returns
0 on success, otherwise less than zero.

◆ sceAudioSetFrequency()

int sceAudioSetFrequency ( int  freq)

Sets the audio output frequency.

Parameters
freqThe frequency (44100 or 48000).
Returns
0 on success, otherwise less than zero.

◆ sceAudioInit()

int sceAudioInit ( )

Inits audio.

◆ sceAudioLoopbackTest()

int sceAudioLoopbackTest ( int  arg0)

◆ sceAudioEnd()

int sceAudioEnd ( )

Frees the audio system.

◆ sceAudio_driver_FF298CE7()

int sceAudio_driver_FF298CE7 ( int  arg)

Selects the delaying mode.

Parameters
argIf set to 1, channels 0 - 6 will be delayed after sceAudioOutputPannedBlocking, otherwise only channels 0 - 4 will be.
Returns
0.

◆ sceAudioSetVolumeOffset()

int sceAudioSetVolumeOffset ( int  arg)

Sets the volume offset/shifting.

Parameters
argThe output buffer will be shifted by (arg + 8); default is 8, so arg = 0 is the default value.
Returns
0.

◆ sceAudioSRCChReserve()

int sceAudioSRCChReserve ( int  sampleCount,
int  freq,
int  numChans 
)

Reserves a SRC output.

Parameters
sampleCountThe number of samples.
freqThe output frequency.
numChansThe number of output "channels" (only 2 is accepted, for stereo)
Returns
0 on success, otherwise less than zero.

◆ sceAudioSRCChRelease()

int sceAudioSRCChRelease ( void  )

Releases a SRC output.

Returns
0 on success, otherwise less than zero.

◆ sceAudioSRCOutputBlocking()

int sceAudioSRCOutputBlocking ( int  vol,
void *  buf 
)

Outputs to SRC. The functions returns only when all the buffer has been played.

Parameters
volThe output volume (0 - 0xFFFF).
bufThe audio PCM buffer.
Returns
The sample count on success, otherwise less than zero.

◆ sceAudioWaitInputEnd()

int sceAudioWaitInputEnd ( )

Waits for the input to end.

Returns
0 on success, otherwise less than 0.

◆ sceAudioInputInitEx()

int sceAudioInputInitEx ( SceAudioInputParams param)

Inits audio input.

Parameters
paramThe structure containing the input parameters.
Returns
0 on success, otherwise less than zero.

◆ sceAudioInputInit()

int sceAudioInputInit ( int  arg0,
int  gain,
int  arg2 
)

Inits audio input (probably deprecated, has less parameters than sceAudioInputInitEx()).

Parameters
arg0
Todo:
?
Parameters
gainThe input gain.
arg2
Todo:
?
Returns
0 on success, otherwise less than zero.

◆ sceAudioInputBlocking()

int sceAudioInputBlocking ( int  sampleCount,
int  freq,
void *  buf 
)

Waits for the input to end, and store input.

Parameters
sampleCountThe number of samples to read.
freqThe input frequency.
bufThe audio PCM input buffer.
Returns
The number of played samples on success, otherwise less than zero.

◆ sceAudioInput()

int sceAudioInput ( int  sampleCount,
int  freq,
void *  buf 
)

Store input.

Parameters
sampleCountThe number of samples to read.
freqThe input frequency.
bufThe audio PCM input buffer.
Returns
The number of played samples on success, otherwise less than zero.

◆ sceAudioGetInputLength()

int sceAudioGetInputLength ( )

Get the number of samples read from input.

Returns
The sample count.

◆ sceAudioPollInputEnd()

int sceAudioPollInputEnd ( )

Checks if the input has ended.

Returns
1 if the input is still running, otherwise 0.

◆ sceAudio_driver_5182B550()

int sceAudio_driver_5182B550 ( int  arg)