KallistiOS git master
Independent SDK for the Sega Dreamcast
|
Basic sound effect support. More...
Go to the source code of this file.
Macros | |
#define | SFXHND_INVALID 0 |
Invalid sound effect handle value. | |
Typedefs | |
typedef uint32_t | sfxhnd_t |
Sound effect handle type. | |
Functions | |
sfxhnd_t | snd_sfx_load (const char *fn) |
Load a sound effect. | |
sfxhnd_t | snd_sfx_load_ex (const char *fn, uint32_t rate, uint16_t bitsize, uint16_t channels) |
Load a sound effect without wav header. | |
sfxhnd_t | snd_sfx_load_fd (file_t fd, size_t len, uint32_t rate, uint16_t bitsize, uint16_t channels) |
Load a sound effect without wav header by file handler. | |
void | snd_sfx_unload (sfxhnd_t idx) |
Unload a sound effect. | |
void | snd_sfx_unload_all (void) |
Unload all loaded sound effects. | |
int | snd_sfx_play (sfxhnd_t idx, int vol, int pan) |
Play a sound effect. | |
int | snd_sfx_play_chn (int chn, sfxhnd_t idx, int vol, int pan) |
Play a sound effect on a specific channel. | |
void | snd_sfx_stop (int chn) |
Stop a single channel of sound. | |
void | snd_sfx_stop_all (void) |
Stop all channels playing sound effects. | |
int | snd_sfx_chn_alloc (void) |
Allocate a sound channel for use outside the sound effect system. | |
void | snd_sfx_chn_free (int chn) |
Free a previously allocated channel. | |
Basic sound effect support.
This file contains declarations for doing simple sound effects. This code is only usable for simple WAV files containing either 8-bit or 16-bit samples (stereo or mono) or Yamaha ADPCM (4-bits, stereo or mono). Also, all sounds played in this manner must be at most 65534 samples in length, as this does not handle buffer chaining or anything else complex. For more interesting stuff, you should probably look at the sound stream stuff instead.