LuaSTG-x Core API
audio::SoundData Class Reference

Public Member Functions

function clone ()
 
function getBitDepth ()
 
function getChannelCount ()
 
function getDuration ()
 Gets the duration of the sound data. More...
 
function getLastError ()
 
function getSample (local i, local channel)
 Gets the value of a sample using an explicit sample index instead of interleaving them in the sample position parameter.
More...
 
function getSampleCount ()
 
function getSampleRate ()
 
function getSize ()
 Gets the Data's size in bytes. More...
 
function setSample (local i, local channel, local sample)
 Sets the value of a sample using an explicit sample index instead of interleaving them in the sample position parameter.
More...
 

Member Function Documentation

◆ clone()

function clone ( )

◆ getBitDepth()

function getBitDepth ( )
Returns
number

◆ getChannelCount()

function getChannelCount ( )
Returns
number

◆ getDuration()

function getDuration ( )

Gets the duration of the sound data.

Returns
The duration of the sound data in seconds.
number

◆ getLastError()

function getLastError ( )
Returns
string

◆ getSample()

function getSample ( local  i,
local  channel 
)

Gets the value of a sample using an explicit sample index instead of interleaving them in the sample position parameter.

Parameters
inumber
channelnumber
Returns
number
重载
fun(self:audio.SoundData, i:number):number

◆ getSampleCount()

function getSampleCount ( )
Returns
number

◆ getSampleRate()

function getSampleRate ( )
Returns
number

◆ getSize()

function getSize ( )

Gets the Data's size in bytes.

Returns
The size of the Data in bytes.
number

◆ setSample()

function setSample ( local  i,
local  channel,
local  sample 
)

Sets the value of a sample using an explicit sample index instead of interleaving them in the sample position parameter.

Parameters
inumber
channelnumber
samplenumber
Returns
audio.SoundData
重载
fun(self:audio.SoundData, i:number, sample:number):audio.SoundData

The documentation for this class was generated from the following file: