Version: 2022.1
言語: 日本語

AudioSettings

class in UnityEngine

マニュアルに切り替える

説明

スクリプトからグローバルなオーディオ設定をします。

スピーカーの出力と形式をセットアップします。

Static 変数

driverCapabilitiesオーディオドライバのスピーカーのモードを返します(読み取り専用)
dspTimeオーディオシステムの現在時刻を返します。
outputSampleRateミキサーの現在の出力レートを取得します。
speakerMode現在のスピーカーのモード。デフォルトは 2 チャンネルのステレオです。

Static 関数

GetConfigurationオーディオデバイスとシステムの現在の設定を返します。これを使用すると、AudioSettings.Reset によって構造体内の値を修正・再適用することが可能になります。
GetDSPBufferSizeサンプル内でミキサーのバッファサイズを取得します。
GetSpatializerPluginNameReturns the name of the spatializer selected on the currently-running platform.
GetSpatializerPluginNamesReturns an array with the names of all the available spatializer plugins.
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 an attempt is made to use the closest match supported by the system.
SetSpatializerPluginNameSets the spatializer plugin for all platform groups. If a null or empty string is passed in, the existing spatializer plugin will be cleared.

Events

OnAudioConfigurationChangedグローバルオーディオ設定が変更されるたびに呼び出されるデリゲートです。設定は AudioSettings.Reset によって変更される場合と、外部の要因によって変更される場合(例えば OS のコントロールパネルでサンプルレートが変更された場合や、HDMI モニタ や USB ヘッドセットの接続時にデフォルトの出力デバイスが変更された場合など)があります。

デリゲート

AudioConfigurationChangeHandlerグローバルオーディオ設定が変更されるたびに呼び出されるデリゲートです。設定はAudioSettings.Reset によって変更される場合と、外部デバイスによって変更される場合(例えば OS のコントロールパネルでサンプルレートが変更された場合や、HDMI モニタ や USB ヘッドセットの接続時にデフォルトの出力デバイスが変更された場合など)があります。
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961