PSPSDK 2024-12-24
Loading...
Searching...
No Matches
pspvaudio.h File Reference

Go to the source code of this file.

Macros

#define PSP_VAUDIO_VOLUME_MAX   0x8000
 The maximum output volume.
 
#define PSP_VAUDIO_SAMPLE_MAX   2048
 The maximum number of samples that can be allocated to a channel.
 
#define PSP_VAUDIO_SAMPLE_MIN   256
 The minimum number of samples that can be allocated to a channel.
 
#define PSP_VAUDIO_FORMAT_MONO   1
 Channel is set to mono output.
 
#define PSP_VAUDIO_FORMAT_STEREO   2
 Channel is set to stereo output.
 
#define PSP_VAUDIO_EFFECT_OFF   0
 Effect type

 
#define PSP_VAUDIO_EFFECT_HEAVY   1
 
#define PSP_VAUDIO_EFFECT_POPS   2
 
#define PSP_VAUDIO_EFFECT_JAZZ   3
 
#define PSP_VAUDIO_EFFECT_UNIQUE   4
 
#define PSP_VAUDIO_EFFECT_MAX   5
 
#define PSP_VAUDIO_ALC_OFF   0
 Alc mode

 
#define PSP_VAUDIO_ALC_MODE1   1
 
#define PSP_VAUDIO_ALC_MODE_MAX   2
 

Functions

int sceVaudioOutputBlocking (int volume, void *buffer)
 Output audio (blocking)
 
int sceVaudioChReserve (int samplecount, int frequency, int format)
 Allocate and initialize a virtual output channel.
 
int sceVaudioChRelease (void)
 Release a virtual output channel.
 
int sceVaudioSetEffectType (int effect, int volume)
 Set effect type.
 
int sceVaudioSetAlcMode (int mode)
 Set ALC(dynamic normalizer)
 

Macro Definition Documentation

◆ PSP_VAUDIO_ALC_MODE1

#define PSP_VAUDIO_ALC_MODE1   1

◆ PSP_VAUDIO_ALC_MODE_MAX

#define PSP_VAUDIO_ALC_MODE_MAX   2

◆ PSP_VAUDIO_ALC_OFF

#define PSP_VAUDIO_ALC_OFF   0

Alc mode

◆ PSP_VAUDIO_EFFECT_HEAVY

#define PSP_VAUDIO_EFFECT_HEAVY   1

◆ PSP_VAUDIO_EFFECT_JAZZ

#define PSP_VAUDIO_EFFECT_JAZZ   3

◆ PSP_VAUDIO_EFFECT_MAX

#define PSP_VAUDIO_EFFECT_MAX   5

◆ PSP_VAUDIO_EFFECT_OFF

#define PSP_VAUDIO_EFFECT_OFF   0

Effect type

◆ PSP_VAUDIO_EFFECT_POPS

#define PSP_VAUDIO_EFFECT_POPS   2

◆ PSP_VAUDIO_EFFECT_UNIQUE

#define PSP_VAUDIO_EFFECT_UNIQUE   4

◆ PSP_VAUDIO_FORMAT_MONO

#define PSP_VAUDIO_FORMAT_MONO   1

Channel is set to mono output.

◆ PSP_VAUDIO_FORMAT_STEREO

#define PSP_VAUDIO_FORMAT_STEREO   2

Channel is set to stereo output.

◆ PSP_VAUDIO_SAMPLE_MAX

#define PSP_VAUDIO_SAMPLE_MAX   2048

The maximum number of samples that can be allocated to a channel.

◆ PSP_VAUDIO_SAMPLE_MIN

#define PSP_VAUDIO_SAMPLE_MIN   256

The minimum number of samples that can be allocated to a channel.

◆ PSP_VAUDIO_VOLUME_MAX

#define PSP_VAUDIO_VOLUME_MAX   0x8000

The maximum output volume.

Function Documentation

◆ sceVaudioChRelease()

int sceVaudioChRelease ( void  )

Release a virtual output channel.

Returns
0 if success, < 0 on error.

◆ sceVaudioChReserve()

int sceVaudioChReserve ( int  samplecount,
int  frequency,
int  format 
)

Allocate and initialize a virtual output channel.

Parameters
samplecount- The number of samples that can be output on the channel per output call. One of 256, 576, 1024, 1152, 2048. It must be a value between PSP_VAUDIO_SAMPLE_MIN and PSP_VAUDIO_SAMPLE_MAX.
frequency- The frequency. One of 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11050, 8000.
format- The output format to use for the channel. One of PSP_VAUDIO_FORMAT_
Returns
0 if success, < 0 on error.

◆ sceVaudioOutputBlocking()

int sceVaudioOutputBlocking ( int  volume,
void buffer 
)

Output audio (blocking)

Parameters
volume- It must be a value between 0 and PSP_VAUDIO_VOLUME_MAX
buffer- Pointer to the PCM data to output.
Returns
0 on success, an error if less than 0.

◆ sceVaudioSetAlcMode()

int sceVaudioSetAlcMode ( int  mode)

Set ALC(dynamic normalizer)

Parameters
mode- The mode. One of PSP_VAUDIO_ALC_
Returns
0 if success, < 0 on error.

◆ sceVaudioSetEffectType()

int sceVaudioSetEffectType ( int  effect,
int  volume 
)

Set effect type.

Parameters
effect- The effect type. One of PSP_VAUDIO_EFFECT_
volume- The volume. It must be a value between 0 and PSP_VAUDIO_VOLUME_MAX
Returns
The volume value on success, < 0 on error.