[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
int Mix_SetPosition(int channel, Sint16 angle, Uint8 distance)
angles % 360
.Mix_SetPanning
.
Mix_SetDistance
effect.
This effect emulates a simple 3D audio effect. It's not all that realistic, but it can help improve some level of realism. By giving it the angle and distance from the camera's point of view, the effect pans and attenuates volumes. If you are looking for better positional audio, using OpenAL is suggested.
NOTE: Using angle and distance of 0, will cause the effect to unregister itself from channel. You cannot unregister it any other way, unless you use Mix_UnregisterAllEffects
on the channel.
Returns: Zero on errors, such as an invalid channel, or if Mix_RegisterEffect
failed.
|
See Also:
4.6.5 Mix_SetPanning,
4.6.6 Mix_SetDistance,
4.6.3 Mix_UnregisterAllEffects