|
sdk-world v2026.11.05
PS2 SDK - world tier (copyleft-allowed, non-essential packages)
|
ADPCM sounds kept in SPU2 memory. More...
Functions | |
| int | audio_sound_load_adpcm (const audio_sound_desc_t *desc, audio_sound_t *sound_out) |
| int | audio_sound_load_apcm (const void *file_data, int32_t file_size_bytes, audio_sound_t *sound_out) |
| int | audio_sound_free (audio_sound_t sound) |
| int | audio_sound_free_all (void) |
ADPCM sounds kept in SPU2 memory.
A sound is loaded once and identified by a handle. It plays on a channel, and one sound can play on several channels at once.
| int audio_sound_free | ( | audio_sound_t | sound | ) |
Stops the sound on every channel and frees its SPU2 memory. The handle is invalid afterwards.
| int audio_sound_free_all | ( | void | ) |
Stops all channels and frees every sound. Channel volume, pan and pitch are kept.
| int audio_sound_load_adpcm | ( | const audio_sound_desc_t * | desc, |
| audio_sound_t * | sound_out ) |
Uploads raw PS-ADPCM to SPU2 memory. The data is copied; the buffer can be freed on return.
| desc | The data and its format. | |
| [out] | sound_out | Receives the handle, or AUDIO_SOUND_INVALID on failure. |
| int audio_sound_load_apcm | ( | const void * | file_data, |
| int32_t | file_size_bytes, | ||
| audio_sound_t * | sound_out ) |
Uploads the image of an APCM file (the .adp files Open PS2 Loader uses). The sample rate is derived from the header pitch field (44100 Hz when the field is absent or out of range); the channel count and the loop flag come from the header too. A looping sound ends its loop before the last, silent block of each channel.
| file_data | The whole file. | |
| file_size_bytes | Its size. | |
| [out] | sound_out | Receives the handle, or AUDIO_SOUND_INVALID on failure. |