ChannelControl::setPan

FMOD Studio API

Firelight Technologies FMOD Studio API

ChannelControl::setPan

Sets the pan level, this is a helper to avoid calling ChannelControl::setMixMatrix.

C++ Syntax

FMOD_RESULT ChannelControl::setPan(
  float pan
);

Parameters

pan

Pan level, from -1.0 (left) to 1.0 (right), default = 0 (center).

Return Values

If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the FMOD_RESULT enumeration.

Remarks

Mono sounds are panned from left to right using constant power panning (non linear fade). This means when pan = 0.0, the balance for the sound in each speaker is 71% left and 71% right, not 50% left and 50% right. This gives (audibly) smoother pans.

Stereo sounds heave each left/right value faded up and down according to the specified pan position. This means when pan = 0.0, the balance for the sound in each speaker is 100% left and 100% right. When pan = -1.0, only the left channel of the stereo sound is audible, when pan = 1.0, only the right channel of the stereo sound is audible.

Panning does not work if the speaker mode is FMOD_SPEAKERMODE_RAW.

See Also




Version 1.10.03 Built on Feb 1, 2018