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 IGModAudioChannel:GetBitsPerSample()
Retrieves the number of bits per sample of the sound channel.
Doesn't work for mp3 and ogg files.
number, number IGModAudioChannel:GetLevel()
Returns the right and left levels of sound played by the 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.
boolean IGModAudioChannel:IsBlockStreamed()
Returns whether the audio stream is block streamed or not.
boolean IGModAudioChannel:IsOnline()
Returns if the sound channel is streamed from the Internet 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: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, boolean dont_decode = false )
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:Stop()
Stop the stream. It can be started again using IGModAudioChannel:Play.
Calling this invalidates the IGModAudioChannel object rendering it unusable for further functions.Issue Tracker: 1497