##### [API function]

## FSOUND_SetPan

Sets a channels pan position linearly

signed char F_API FSOUND_SetPan(
int channel,
int pan
);

### Parameters

channel | The channel number/handle to change the pan for. FSOUND_ALL can also be used (see remarks)
pan | The panning position for this channel to set. parameters are: - from 0 (full left) to 255 (full right) - FSOUND_STEREOPAN. This is meant for stereo samples, but will work on mono samples as well. It makes both left and right FULL volume instead of 50/50 as middle panning does. See remarks section for more information on this.

### Return Value

On success, TRUE is returned.
On failure, FALSE is returned.

### Remarks

FSOUND_ALL is supported. Passing this will set the pan of ALL channels available.
If FSOUND_ALL is used the last channel success flag will be returned. This return value is not useful in most circumstances.
----------
Important : If you are playing a STEREO sample, and using normal middle panning, it will only come out at half the volume
they are supposed to. To avoid this use FSOUND_STEREO pan.
Panning works in the following manner:
full left : 100to left, 0to right
full right : 0to left, 100to right
middle : 71to left, 71to right
FMOD Uses 'constant power' panning. The center position is 71 4749584n each channel as it keeps an even RMS output level when
moving the sound from left to right. Placing 50 4749584n each channel for a middle position is incorrect.
The pan graph for constant power panning resembles a curve instead of straight lines.
___________________
Supported on the following platforms : Win32, WinCE, Linux, Macintosh, XBox, PlayStation 2, GameCube

### See Also

FSOUND_DSP_MixBuffers , FSOUND_GetPan , FSOUND_Sample_SetDefaults , FSOUND_Sample_SetDefaultsEx , FSOUND_Stream_Play , FSOUND_Stream_PlayEx

This document copyright ©Firelight Technologies, Pty, Ltd, 1999-2002. All rights reserved.
Generated Thu Dec 15 17:31:34 2005 by SourceDoc v0.10, the automated source code documenter.