+ | _sd : _SoundDevice |
程序开始时自动创建。脚本中应该使用此对象。 |
+ | FadeIn : uint |
渐入的标示。
|
+ | FadeOut : uint |
渐出的标示。
|
+ | LinearRolloff : uint |
线性衰减的标志。3D声效默认是指数衰减。
|
+ | Loop : uint |
循环的标示。
|
+ | masterGroup : _SoundGroup |
声音组类。
|
+ | recordEnable : _SoundGroup |
录音功能是否可用,麦克风不存在时返回false。
|
+ | autoListener : bool |
为true时会自动根据当前摄像机位置设置3D音效的环境,即不需要调用 setListener,默认为true。
|
+ | fadeTime : uint |
设置渐入渐出的时间。
|
+ | maxDistance : float |
默认的声音衰减的终点位置。默认值为2000。对数衰减模式下为不再衰减的距离,线性衰减模式下为衰减到0的位置,即声音传播的最大半径。
|
+ | minDistance : float |
默认的声音衰减的起始位置,默认值为50。对数衰减模式下每隔该距离声音强度衰减一半,线性衰减模式下为开始衰减的位置。
|
+ | mute : bool |
用来控制全局的声音开关。
|
+ | function _SoundDevice() : _SoundDevice |
示例
|
+ | function getSoundInfo(String : name) : table |
获取声音文件的信息。
|
+ | function isPlaying() : _bool |
|
+ | function set3DSettings(dopplerscale : number, distancefactor : number, rolloffscale : number) |
3d音效的设置。
|
设置Listener的属性。 |