Set distance

From Bennu Wiki
Jump to: navigation, search


Definition

INT set_distance ( <INT channel> , <INT distance> )

Set the "distance" of a sound channel. the distance specifies the location of the sound in relation to the listener. If you want also want to have control over the angle, see Set_position().

Parameters

INT channel - The sound channel to change the position of.
INT distance - The distance (0-255).

Returns

INT : Status.

0 - Ok.
-1 - Error: sound inactive.

Notes

Distance value's

0 - The sound is near (or at it's loudest).
255 - The sound is far away (very quite).



Sound Functions
Fade_music_in()Fade_music_off()Is_playing_song()Is_playing_wav()Load_song()Load_wav()Pause_song()Pause_wav()Play_song()Play_wav()Reserve_channels()Resume_song()Resume_wav()Reverse_stereo()Set_Wav_Volume()Set_channel_volume()Set_distance()Set_music_position()Set_panning()Set_position()Set_song_volume()Sound_close()Sound_init()Stop_song()Stop_wav()Unload_song()Unload_wav()