Garry's Mod Wiki

IGModAudioChannel:SetTime

  IGModAudioChannel:SetTime( number secs, boolean dont_decode = false )

Description

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.

Streamed sounds can only have their time set to up to the current IGModAudioChannel:GetBufferedTime.

Arguments

1 number secs
The time to set the stream to, in seconds.
2 boolean dont_decode = false
Set to true to skip decoding to set time, and instead just seek to it which is faster. Certain streams do not support seeking and have to decode to the given position.