Skip to content

raylib.SetSoundPan

JoeStrout edited this page Oct 18, 2026 · 3 revisions

Set pan for a sound

Parameters

Parameter Default Value Note
sound
pan 0.0

Return value

None.

Notes

Example

SetSoundPan controls how loud the sound plays in the left speaker versus the right. The pan parameter ranges from -1.0 (full left) to 1.0 (full right). A value of 0.0 means balanced (center).

(Note that this changed in November 2025; before that, the sign ranged from 0=right to 1=left. So be careful when working from older code examples.)

raylib.InitAudioDevice
sound = raylib.LoadSound("resources/beep.wav")
raylib.SetSoundPan sound, -1  // pan fully left
raylib.PlaySound sound
raylib.UnloadSound sound
raylib.CloseAudioDevice

Clone this wiki locally