function update(self: AudioScript) -- updates the volume for AudioSound playback when the input is changed if self.soundInstance then self.soundInstance.volume = self.volumeNumber / 100 endend
function advance(self: AudioScript, seconds: number): boolean if self.soundInstance then self.isCompleted = self.soundInstance:completed() -- whether playback has finished end return trueend
function advance(self: AudioScript, seconds: number): boolean if self.soundInstance then self.currentTime = self.soundInstance:time() -- current playback time in seconds end return trueend
function advance(self: AudioScript, seconds: number): boolean if self.soundInstance then self.currentTimeFrame = self.soundInstance:timeFrame() -- current playback time in PCM frames end return trueend