Sound Clip

Betray supports full 3D sound playback of preloaded clips. The user loads a mono clip in to the 3D sound engine and can then trigger it to play and movce anywhere in the environment with full surround and dopler. Please note that all these functions are defered to plugins to actiulay record and play out the sound.

betray_audio_sound_create

uint betray_audio_sound_create(uint type, uint stride, uint length, uint frequency, void *data, char *name);

Description: Load a sound clip in to betrays sound system.

betray_audio_sound_destroy

void betray_audio_sound_destroy(uint sound);

Description: Unload a sound clip.

betray_audio_sound_play

uint betray_audio_sound_play(uint sound, float *pos, float *vector, float speed, float volume, boolean loop, boolean ambient, boolean auto_delete);

Description: Play a sound at a particular speed, volume traeling along a vector. If looped the sound will keep replaying until stopped. The function returns a handle that can be used to stop, or modify the sound later. All sounds need to be deleted manulay once played, exept you the auto delete is set. Auto delete will automaticaly remove the sound once it has been played. If Auto delete is set to true you can not modify the sound after creating it. By setting the sound to ambient the position of the sound will be in the same space as the listener and will therfor not be afected by head movements of the listener.

betray_audio_sound_set

void betray_audio_sound_set(uint play, float *pos, float *vector, float speed, float volume, boolean loop, boolean ambient);

Description: change settings for an already playing sound

betray_audio_sound_is_playing

boolean betray_audio_sound_is_playing(uint play);

Description: Returns true or false if a sound is still playing.

betray_audio_sound_stop

void betray_audio_sound_stop(uint play);

Description: Stop playing a sound