AR_Engine_SDK
载入中...
搜索中...
未找到
函数 | 变量
IXAudioSource.lua 文件参考

函数

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 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
 

变量

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

函数说明

◆ GetAudioCurrentTime()

function IXAudioSource GetAudioCurrentTime ( )

获取音频当前播放时间

返回
number 当前播放时间(单位:秒)

◆ GetAudioDuration()

function IXAudioSource GetAudioDuration ( )

获取音频总时长

返回
number

◆ GetAudioFileName()

function IXAudioSource GetAudioFileName ( )

获取音频资源文件名称

返回
string

◆ GetGain()

function IXAudioSource GetGain ( )

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

返回
number 增益值Range:[0.0-]

◆ GetLocation()

function IXAudioSource GetLocation ( )

获取音频位置

返回
XVECTOR3 音频位置

◆ GetPitch()

function IXAudioSource GetPitch ( )

获取音高

返回
number 音高

◆ GetSourceId()

function IXAudioSource GetSourceId ( )

获取音频Id

返回
number

◆ GetState()

function IXAudioSource GetState ( )

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

返回
number 音频状态

◆ GetVelocity()

function IXAudioSource GetVelocity ( )

获取音频速度

返回
XVECTOR3 音频速度

◆ IsLooped()

function IXAudioSource IsLooped ( )

获取音频是否循环播放

返回
boolean 是否循环播放

◆ Pause()

function IXAudioSource Pause ( )

暂停音频

返回
void

◆ Play()

function IXAudioSource Play ( )

播放音频

返回
void

◆ Resume()

function IXAudioSource Resume ( )

恢复音频

返回
void

◆ Rewind()

function IXAudioSource Rewind ( )

回放音频

返回
void

◆ Seek()

function IXAudioSource Seek ( time  )

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

参数
timenumber 定位播放时间,即播放偏移(单位:秒)
返回
void

◆ SetAttenuation()

function IXAudioSource SetAttenuation ( attenuation  )

设置音频衰减系数

参数
attenuationnumber 衰减系数
返回
void

◆ SetGain()

function IXAudioSource SetGain ( gain  )

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

参数
gainnumber 增益值Range:[0.0-]
返回
void

◆ SetLocation() [1/2]

function IXAudioSource SetLocation ( velocity  )

设置音频位置

参数
velocityXVECTOR3 位置值(x,y,z)
返回
void

◆ SetLocation() [2/2]

function IXAudioSource SetLocation ( x  ,
y  ,
z   
)

设置音频位置

参数
xnumber 在X方向上的位置值
ynumber 在Y方向上的位置值
znumber 在Z方向上的位置值
返回
void

◆ SetLoop()

function IXAudioSource SetLoop ( looped  )

设置音频是否循环播放

参数
loopedboolean 是否循环播放
返回
void

◆ SetMinDistance()

function IXAudioSource SetMinDistance ( distance  )

设置音频距离

参数
distancenumber 音频相对距离
返回
void

◆ SetPitch()

function IXAudioSource SetPitch ( pitch  )

设置音高

参数
pitchnumber
返回
void

◆ SetTransform()

function IXAudioSource SetTransform ( transform  )

设置音频位置

参数
transformXMATRIX4 矩阵,包含位置偏移
返回
void

◆ SetVelocity() [1/2]

function IXAudioSource SetVelocity ( location  )

设置音频速度

参数
locationXVECTOR3
返回
void

◆ SetVelocity() [2/2]

function IXAudioSource SetVelocity ( x  ,
y  ,
z   
)

设置音频速度

参数
xnumber 在X方向上的速度值
ynumber 在Y方向上的速度值
znumber 在Z方向上的速度值
返回
void

◆ Stop()

function IXAudioSource Stop ( )

停止播放音频

返回
void

变量说明

◆ INITIAL

IXAudioSource INITIAL = 0

◆ IXAudioSource

◆ PAUSED

IXAudioSource PAUSED = 0

◆ PLAYING

IXAudioSource PLAYING = 0

◆ STOPPED

IXAudioSource STOPPED = 0