[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
int Mix_SetPanning(int channel, Uint8 left, Uint8 right)
This effect will only work on stereo audio. Meaning you called Mix_OpenAudio
with 2 channels (MIX_DEFAULT_CHANNELS). The easiest way to do true panning is to call
Mix_SetPanning(channel, left, 254 - left);
so that the total volume is correct,
if you consider the maximum volume to be 127 per channel for center, or 254 max for left, this works, but about halves the effective volume.
This Function registers the effect for you, so don't try to Mix_RegisterEffect
it yourself.
NOTE: Setting both left and right to 255 will unregister the effect from
channel. You cannot unregister it any other way, unless you use
Mix_UnregisterAllEffects
on the channel.
NOTE: Using this function on a mono audio device will not register the effect, nor will it return an error status.
Returns: Zero on errors, such as bad channel, or if Mix_RegisterEffect
failed.
|
See Also:
4.6.7 Mix_SetPosition,
4.6.3 Mix_UnregisterAllEffects