Garry's Mod Wiki

IGModAudioChannel:SetPan

IGModAudioChannel:SetPan( number pan )

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 and 1 is only in the right channel.

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 )

Page Links


Special Pages


Wikis

?

Render Time: 36ms

DB GetPage 4
Generate Html 2
SaveChanges (1) 9
Render Body 0
Render Sidebar 18