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.
boolean IGModAudioChannel:Get3DEnabled()
Returns if the sound channel is currently in 3D mode or not. This value will be affected by IGModAudioChannel:Set3DEnabled.
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
table IGModAudioChannel:GetTagsHTTP()
Retrieves HTTP headers from a bass stream channel created by sound.PlayURL, if available.
table IGModAudioChannel:GetTagsID3()
Retrieves the ID3 version 1 info from a bass channel created by sound.PlayFile or sound.PlayURL, if available. ID3v2 is not supported.
string IGModAudioChannel:GetTagsMeta()
Retrieves meta stream info from a bass stream channel created by sound.PlayURL, if available.
table IGModAudioChannel:GetTagsOGG()
Retrieves OGG media info tag, from a bass channel created by sound.PlayURL or sound.PlayFile, if available.
string IGModAudioChannel:GetTagsVendor()
Retrieves OGG Vendor tag, usually containing the application that created the file, from a bass channel created by sound.PlayURL or sound.PlayFile, if available.
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:Set3DEnabled( boolean enable )
Sets the 3D mode of the channel. This will affect IGModAudioChannel:Get3DEnabled but not IGModAudioChannel:Is3D. This feature requires the channel to be initially created in 3D mode, i.e. IGModAudioChannel:Is3D should return true or this function will do nothing.
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 and IGModAudioChannel:IsBlockStreamed must return false.
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: 31ms

DB GetPage 3
Generate Html 6
SaveChanges (1) 8
Render Body 0
Render Sidebar 11