13#define SOUND_ATTEN_NONE 0
14#define SOUND_ATTEN_INV_DISTANCE 1
15#define SOUND_ATTEN_LINEAR 2
16#define SOUND_ATTEN_EXP_DISTANCE 3
113sound_emitter *
sound_play3D(uint8_t
priority,
sound_sample sample, uint8_t
reverb, uint8_t
loop,
float volume,
float pitch,
Vec3 position, uint8_t attenModel,
float attenMinDistance,
float attenMaxDistance,
float attenRolloff);
void IOFILE
Opaque handle to an open file descriptor.
sound_sample sound_loadWav(IOFILE *file)
Load a sample from a .WAV file.
sound_emitter * sound_play3D(uint8_t priority, sound_sample sample, uint8_t reverb, uint8_t loop, float volume, float pitch, Vec3 position, uint8_t attenModel, float attenMinDistance, float attenMaxDistance, float attenRolloff)
Begin playing a 3D sound, returning a pointer to the emitter.
void sound_setPosition(sound_emitter *voice, Vec3 position)
Update the position of the emitter.
void sound_destroy(sound_emitter *voice)
Destroy the sound emitter.
void sound_playOneShot(uint8_t priority, sound_sample sample, uint8_t reverb, float volume, float pitch, float pan)
Play a one-shot sample.
sound_sample sound_loadWavBytes(const uint8_t *data)
Load a sample from a .WAV file blob.
void sound_stop(sound_emitter *voice)
Stop playing the sound emitter.
void sound_update()
Update sound playback.
void sound_playOneShot3D(uint8_t priority, sound_sample sample, uint8_t reverb, float volume, float pitch, Vec3 position, uint8_t attenModel, float attenMinDistance, float attenMaxDistance, float attenRolloff)
Play a one-shot sample in 3D.
void sound_init()
Initialize the sound driver.
sound_emitter * sound_play(uint8_t priority, sound_sample sample, uint8_t reverb, uint8_t loop, float volume, float pitch, float pan)
Begin playing a sound, returning a pointer to the emitter.
void sound_setListener(Vec3 listenerPosition, Quaternion listenerOrientation)
Set the position and orientation of the listener.
A three-component vector.
Struct containing the state of a sound emitter.
struct sound_voice * voice
struct sound_emitter * next
struct sound_emitter * prev
Represents a loaded sound sample.