返回介绍

AudioSettings 音频设置

发布于 2019-12-18 15:37:23 字数 2869 浏览 1120 评论 0 收藏 0

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耳机。

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文