Set position
Jump to navigation
Jump to search
Definition
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().
Parameters
INT channel | - The sound channel to change the position of. |
INT angle | - The angle (0-360). |
INT distance | - The distance (0-255). |
Returns
INT : Status.
0 | - Ok. |
-1 | - Error: sound inactive. |
Notes
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). |