You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.InitAudioDevicesound=raylib.LoadSound("resources/beep.wav")
raylib.SetSoundPansound, -1// pan fully leftraylib.PlaySoundsoundraylib.UnloadSoundsoundraylib.CloseAudioDevice