Set position

From Bennu Wiki
Revision as of 06:50, 14 March 2012 by (talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


INT set_position ( <INT channel> , <INT angle> , <INT distance> )

Sets the position of a sound channel. With this function you can "emulate" a simple 3d audio effect. If you only want to control the distance, you can use Set_distance().


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


INT : Status.

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


Angle value's

0 degrees - Sound is directly in front.
90 degrees - Sound is directly to the right.
180 degrees - Sound is directly behind.
270 degrees - Sound is directly to the left.

Distance value's

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

Sound Functions