Sound

Summary
Sound
Functions
snd_set_channelSets the parameters for a sound channel.
snd_load_wvLoads a wavpack compressed sound.
snd_play_atPlays a sound at a specified postition.
snd_playPlays a sound.
snd_stopStops a currenly playing sound.
snd_set_listener_posSets the listener posititon.

Functions

snd_set_channel

void snd_set_channel(int cid,
float vol,
float pan)

Sets the parameters for a sound channel.

Arguments

cidChannel ID
volVolume for the channel.  0.0 to 1.0.
panPanning for the channel.  -1.0 is all left.  0.0 is equal distribution.  1.0 is all right.

snd_load_wv

int snd_load_wv(const char *filename)

Loads a wavpack compressed sound.

Arguments

filenameFilename of the file to load

Returns

The id of the loaded sound.  -1 on failure.

snd_play_at

int snd_play_at(int cid,
int sid,
int flags,
float x,
float y)

Plays a sound at a specified postition.

Arguments

cidChannel id of the channel to use.
sidSound id of the sound to play.
flagsTODO
xTODO
yTODO

Returns

An id to the voice.  -1 on failure.

See Also

<snd_play, snd_stop>

snd_play

int snd_play(int cid,
int sid,
int flags)

Plays a sound.

Arguments

Arguments: cid - Channel id of the channel to use. sid - Sound id of the sound to play. flags - TODO

Returns

An id to the voice.  -1 on failure.

See Also

<snd_play_at, snd_stop>

snd_stop

void snd_stop(int id)

Stops a currenly playing sound.

Arguments

idThe ID of the voice to stop.

See Also

<snd_play, snd_play_at>

snd_set_listener_pos

void snd_set_listener_pos(float x,
float y)

Sets the listener posititon.

Arguments

xTODO
yTODO
void snd_set_channel(int cid,
float vol,
float pan)
Sets the parameters for a sound channel.
int snd_load_wv(const char *filename)
Loads a wavpack compressed sound.
int snd_play_at(int cid,
int sid,
int flags,
float x,
float y)
Plays a sound at a specified postition.
int snd_play(int cid,
int sid,
int flags)
Plays a sound.
void snd_stop(int id)
Stops a currenly playing sound.
void snd_set_listener_pos(float x,
float y)
Sets the listener posititon.
Close