Garry's Mod Wiki

IGModAudioChannel

A sound channel returned by a callback of sound.PlayURL and sound.PlayFile.

Methods

IGModAudioChannel:EnableLooping( boolean enable )
Enables or disables looping of audio channel, requires noblock flag.
number IGModAudioChannel:FFT( table tbl, number size )
Computes the DFT (discrete Fourier transform) of the sound channel. The size parameter specifies the number of consecutive audio samples to use as the input to the DFT and is restricted to a power of two. A Hann window is applied to the input data. The computed DFT has the same number of frequency bins as the number of samples. Only half of this DFT is returned, since the DFT magnitudes are symmetric for real input data. The magnitudes of the DFT (values from 0 to 1) are used to fill the output table, sta..
number, number, number IGModAudioChannel:Get3DCone()
Returns 3D cone of the sound channel. See IGModAudioChannel:Set3DCone.
number, number IGModAudioChannel:Get3DFadeDistance()
Returns 3D fade distances of a sound channel.
number IGModAudioChannel:GetAverageBitRate()
Returns the average bit rate of the sound channel.
number IGModAudioChannel:GetBitsPerSample()
Retrieves the number of bits per sample of the sound channel. Doesn't work for mp3 and ogg files.
string IGModAudioChannel:GetFileName()
Returns the filename for the sound channel.
number IGModAudioChannel:GetLength()
Returns the length of sound played by the sound channel.
number, number IGModAudioChannel:GetLevel()
Returns the right and left levels of sound played by the sound channel.
number IGModAudioChannel:GetPan()
Gets the relative volume of the left and right channels.
number IGModAudioChannel:GetPlaybackRate()
Returns the playback rate of the sound channel.
Vector IGModAudioChannel:GetPos()
Returns position of the sound channel
number IGModAudioChannel:GetSamplingRate()
Returns the sample rate for currently playing sound.
number IGModAudioChannel:GetState()
Returns the state of a sound channel
number IGModAudioChannel:GetTime()
Returns the current time of the sound channel
number IGModAudioChannel:GetVolume()
Returns volume of a sound channel
boolean IGModAudioChannel:Is3D()
Returns if the sound channel is in 3D mode or not.
boolean IGModAudioChannel:IsBlockStreamed()
Returns whether the audio stream is block streamed or not.
boolean IGModAudioChannel:IsLooping()
Returns if the sound channel is looping or not.
boolean IGModAudioChannel:IsOnline()
Returns if the sound channel is streamed from the Internet or not.
boolean IGModAudioChannel:IsValid()
Returns if the sound channel is valid or not.
IGModAudioChannel:Pause()
Pauses the stream. It can be started again using IGModAudioChannel:Play
IGModAudioChannel:Play()
Starts playing the stream.
IGModAudioChannel:Set3DCone( number innerAngle, number outerAngle, number outerVolume )
Sets 3D cone of the sound channel.
IGModAudioChannel:Set3DFadeDistance( number min, number max )
Sets 3D fade distances of a sound channel.
IGModAudioChannel:SetPan( number pan )
Sets the relative volume of the left and right channels.
IGModAudioChannel:SetPlaybackRate( number rate )
Sets the playback rate of the sound channel. May not work with high values for radio streams.
IGModAudioChannel:SetPos( Vector pos, Vector dir = Vector( 0, 0, 0 ) )
Sets position of sound channel in case the sound channel has a 3d option set.
IGModAudioChannel:SetTime( number secs )
Sets the sound channel to specified time ( Rewind to that position of the song ). Does not work on online radio streams. Streamed sounds must have "noblock" parameter for this to work.
IGModAudioChannel:SetVolume( number volume )
Sets the volume of a sound channel
IGModAudioChannel:Stop()
Stop the stream. It can be started again using IGModAudioChannel:Play. Calling this invalidates the IGModAudioChannel object rendering it unusable for further functions.

Page Links


Special Pages


Wikis

?

Render Time: 35ms

DB GetPage 7
Generate Html 6
SaveChanges 12
Render Body 0
Render Sidebar 7