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
·
4 revisions
Set pan for music
Parameters
Parameter
Default Value
Note
music
pan
0.0
Return value
None.
Notes
SetMusicPan controls how loud the music 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.)
Example
raylib.InitAudioDevicemusic=raylib.LoadMusicStream("resources/music.ogg")
raylib.SetMusicPanmusic, 1.0// pan rightraylib.PlayMusicStreammusicraylib.UnloadMusicStreammusicraylib.CloseAudioDevice