AR_Engine_SDK
Functions | Variables
IXAudioSource.lua File Reference

Functions

function IXAudioSource GetSourceId () end
 
function IXAudioSource GetAudioFileName () end
 
function IXAudioSource Play () end
 
function IXAudioSource Stop () end
 
function IXAudioSource Pause () end
 
function IXAudioSource Resume () end
 
function IXAudioSource Rewind () end
 
function IXAudioSource IsStoped () end
 
function IXAudioSource IsSourceFinished () end
 
function IXAudioSource SetLoop (looped) end
 
function IXAudioSource IsLooped () end
 
function IXAudioSource SetGain (gain) end
 
function IXAudioSource GetGain () end
 
function IXAudioSource SetPitch (pitch) end
 
function IXAudioSource GetPitch () end
 
function IXAudioSource SetMinDistance (distance) end
 
function IXAudioSource SetAttenuation (attenuation) end
 
function IXAudioSource GetVelocity () end
 
function IXAudioSource SetVelocity (location) end
 
function IXAudioSource SetVelocity (x, y, z) end
 
function IXAudioSource GetLocation () end
 
function IXAudioSource SetLocation (velocity) end
 
function IXAudioSource SetLocation (x, y, z) end
 
function IXAudioSource SetTransform (transform) end
 
function IXAudioSource GetAudioCurrentTime () end
 
function IXAudioSource Seek (time) end
 
function IXAudioSource GetAudioDuration () end
 
function IXAudioSource GetState () end
 

Variables

 INITIAL = 0
 
 PLAYING = 0
 
 PAUSED = 0
 
 STOPPED = 0
 
 IXAudioSource = {}
 

Function Documentation

◆ GetAudioCurrentTime()

function IXAudioSource GetAudioCurrentTime ( )

获取音频当前播放时间,即tell

Returns
number 当前播放时间,即tell

◆ GetAudioDuration()

function IXAudioSource GetAudioDuration ( )

IXAudioSource_GetAudioDuration00

Returns
number

◆ GetAudioFileName()

function IXAudioSource GetAudioFileName ( )

获取音频资源文件名称

Returns
string

◆ GetGain()

function IXAudioSource GetGain ( )

获取音频增益,注意音频增益与音量不同

Returns
number 增益值Range:[0.0-]

◆ GetLocation()

function IXAudioSource GetLocation ( )

获取音频位置

Returns
XVECTOR3 音频位置

◆ GetPitch()

function IXAudioSource GetPitch ( )

获取音高

Returns
number 音高

◆ GetSourceId()

function IXAudioSource GetSourceId ( )

获取音频Id

Returns
number

◆ GetState()

function IXAudioSource GetState ( )

获取音频状态,包括初始化,播放,暂停,停止

Returns
number 音频状态

◆ GetVelocity()

function IXAudioSource GetVelocity ( )

获取音频速度

Returns
XVECTOR3 音频速度

◆ IsLooped()

function IXAudioSource IsLooped ( )

获取音频是否循环播放

Returns
boolean 是否循环播放

◆ IsSourceFinished()

function IXAudioSource IsSourceFinished ( )

是否音频已播放完成

Returns
boolean

◆ IsStoped()

function IXAudioSource IsStoped ( )

是否已停止播放音频

Returns
boolean

◆ Pause()

function IXAudioSource Pause ( )

暂停音频

Returns
void

◆ Play()

function IXAudioSource Play ( )

播放音频

Returns
void

◆ Resume()

function IXAudioSource Resume ( )

恢复音频

Returns
void

◆ Rewind()

function IXAudioSource Rewind ( )

回放音频

Returns
void

◆ Seek()

function IXAudioSource Seek ( time  )

设置音频播放的时间,即播放偏移

Parameters
timenumber 定位播放时间,即播放偏移
Returns
void

◆ SetAttenuation()

function IXAudioSource SetAttenuation ( attenuation  )

设置音频衰减系数

Parameters
attenuationnumber 衰减系数
Returns
void

◆ SetGain()

function IXAudioSource SetGain ( gain  )

设置音频增益,注意音频增益与音量不同

Parameters
gainnumber 增益值Range:[0.0-]
Returns
void

◆ SetLocation() [1/2]

function IXAudioSource SetLocation ( velocity  )

设置音频位置

Parameters
velocityXVECTOR3 位置值(x,y,z)
Returns
void

◆ SetLocation() [2/2]

function IXAudioSource SetLocation ( x  ,
y  ,
z   
)

设置音频位置

Parameters
xnumber 在X方向上的位置值
ynumber 在Y方向上的位置值
znumber 在Z方向上的位置值
Returns
void

◆ SetLoop()

function IXAudioSource SetLoop ( looped  )

设置音频是否循环播放

Parameters
loopedboolean 是否循环播放
Returns
void

◆ SetMinDistance()

function IXAudioSource SetMinDistance ( distance  )

设置音频距离

Parameters
distancenumber 音频相对距离
Returns
void

◆ SetPitch()

function IXAudioSource SetPitch ( pitch  )

设置音高

Parameters
pitchnumber
Returns
void

◆ SetTransform()

function IXAudioSource SetTransform ( transform  )

设置音频位置

Parameters
transformXMATRIX4 矩阵,包含位置偏移
Returns
void

◆ SetVelocity() [1/2]

function IXAudioSource SetVelocity ( location  )

设置音频速度

Parameters
locationXVECTOR3
Returns
void

◆ SetVelocity() [2/2]

function IXAudioSource SetVelocity ( x  ,
y  ,
z   
)

设置音频速度

Parameters
xnumber 在X方向上的速度值
ynumber 在Y方向上的速度值
znumber 在Z方向上的速度值
Returns
void

◆ Stop()

function IXAudioSource Stop ( )

停止播放音频

Returns
void

Variable Documentation

◆ INITIAL

INITIAL = 0

◆ IXAudioSource

◆ PAUSED

PAUSED = 0

◆ PLAYING

PLAYING = 0

◆ STOPPED

STOPPED = 0