HolyLib Wiki

VoiceStream

VoiceStream

This class represents the VoiceStream that contains VoiceData

Metatable function Description
__tostring Returns a formated string of the VoiceStream -> VoiceStream [number of VoiceData]
__index Used to find the functions on the metatable and access saved variables
__newindex Used to allow one to save variables on the object
__gc Internally deletes the VoiceStream turning it invalid

Methods

number VoiceStream:GetCount( )
Returns the number of VoiceData it stores.
VoiceData VoiceStream:GetCurrentTick( boolean directData = false )
Returns the VoiceData of the current tick without changing the internal tick count
table VoiceStream:GetData( boolean directData = false )
Returns a table, with the tick as key and copy of the VoiceData as value.
The returned VoiceData is just a copy as long as you didn't set directData
modifying them won't affect the internally stored VoiceData.
Call VoiceStream:SetData or VoiceStream:SetIndex after you modified it to update it.
VoiceData VoiceStream:GetIndex( boolean directData = false )
Returns a copy of the VoiceData for the given index or nil. The returned VoiceData is just a copy as long as you didn't set directData
modifying them won't affect the internally stored VoiceData.
Call VoiceStream:SetData or VoiceStream:SetIndex after you modified it to update it.
VoiceData VoiceStream:GetNextTick( boolean directData = false )
Returns the VoiceData of the next tick and increments the internal tick counter by one.
VoiceData VoiceStream:GetPreviousTick( boolean directData = false )
Returns the VoiceData of the previous tick and decrements the internal tick count by one
boolean VoiceStream:IsValid( )
Returns whether this VoiceStream is valid.
number VoiceStream:ResetTick( number resetTick = 0 )
Resets the current tick of the voicestream back to the given value or 0
Returns the tick it was previously at
VoiceStream:SetData( table data, boolean directData = false )
Sets the VoiceStream from the given table.
VoiceStream:SetIndex( number index, VoiceData voiceData, boolean directData = false )
Create a copy of the given VoiceData and sets it onto the specific index and overrides any data thats already present.