Garry's Mod Wiki

IGModAudioChannel:SetPan

Description

Sets the relative volume of the left and right channels.

Arguments

1 number pan
Relative volume between the left and right channels. -1 means only in left channel, 0 is center (default) and 1 is only in the right channel. Fractional values are supported.

Example

Plays the a Half-Life 1 sound track in the left channel.

sound.PlayFile( "sound/music/hl1_song20.mp3", "", function( channel ) if ( IsValid( channel ) ) then channel:Play() channel:SetPan( -1 ) end end )