用户工具

站点工具


侧边栏



Unity3D中文文档

script:unityengine:classes:audiosettings:audiosettings

AudioSettings 音频设置

Description 描述

Controls the global audio settings from script.

Setup speaker output and format.

控制从脚本中的全局音频设置。

设置扬声器输出和格式。

Static Variables 静态变量

driverCapabilitiesReturns the speaker mode capability of the current audio driver. (Read Only)
返回当前扬声器的性能模式。(只读)
dspTimeReturns the current time of the audio system.
返回音频系统的运行时间。
outputSampleRateGet the mixer's current output rate.
获取混合器当前的输出频率。
speakerModeGets the current speaker mode. Default is 2 channel stereo.
获取当前的音频模式。默认是双声道立体声。

Static Functions 静态方法

GetConfigurationReturns the current configuration of the audio device and system. The values in the struct may then be modified and reapplied via AudioSettings.Reset.
返回音频设备和系统的当前配置。在该结构体中的值可以修改并由AudioSettings.Reset重置。
GetDSPBufferSizeGet the mixer's buffer size in samples.
获取案例中混合器的缓冲区大小。
ResetPerforms a change of the device configuration. In response to this the AudioSettings.OnAudioConfigurationChanged delegate is invoked with the argument deviceWasChanged=false. It cannot be guaranteed that the exact settings specified can be used, but the an attempt is made to use the closest match supported by the system.
执行修改设备配置。针对AudioSettings.OnAudioConfigurationChanged委托参数deviceWasChanged=false被调用。它不能保证所指定的设置可以使用,但尝试使用系统支持的最接近的值

Delegates 委托

AudioConfigurationChangeHandlerA delegate called whenever the global audio settings are changed, either by AudioSettings.Reset or by an external device change such as the OS control panel changing the sample rate or because the default output device was changed, for example when plugging in an HDMI monitor or a USB headset.
每当全局音频设置被更改时,该委托被调用,无论是AudioSettings.Reset或由外部设备的更改,如系统控制面板修改采样率或因为默认输出设备被更改,例如当插入HDMI显示器或USB耳机。
script/unityengine/classes/audiosettings/audiosettings.txt · 最后更改: 2016/08/02 05:27 (外部编辑)