C# Class HoloToolkit.Unity.SpatialSoundSettings

The SpatialSoundSettings class provides a set of methods that simplify making modifications to Microsoft Spatial Sound Spatializer parameters.
显示文件 Open project: Microsoft/HoloToolkit-Unity Class Usage Examples

Public Methods

Method Description
SetMaxGain ( AudioSource audioSource, float gain ) : void

Sets the Spatial Sound maximum gain.

SetMinGain ( AudioSource audioSource, float gain ) : void

Sets the Spatial Sound minimum gain.

SetRoomSize ( AudioSource audioSource, SpatialSoundRoomSizes room ) : void

Sets the Spatial Sound room size.

SetUnityGainDistance ( AudioSource audioSource, float distance ) : void

Sets the Spatial Sound unity gain distance.

Private Methods

Method Description
SetParameter ( AudioSource audioSource, SpatialSoundParameters param, float value ) : void

Sets a Spatial Sound parameter on an AudioSource.

Method Details

SetMaxGain() public static method

Sets the Spatial Sound maximum gain.
public static SetMaxGain ( AudioSource audioSource, float gain ) : void
audioSource UnityEngine.AudioSource The AudioSource on which the maximum gain will be set.
gain float
return void

SetMinGain() public static method

Sets the Spatial Sound minimum gain.
public static SetMinGain ( AudioSource audioSource, float gain ) : void
audioSource UnityEngine.AudioSource The AudioSource on which the minimum gain will be set.
gain float
return void

SetRoomSize() public static method

Sets the Spatial Sound room size.
public static SetRoomSize ( AudioSource audioSource, SpatialSoundRoomSizes room ) : void
audioSource UnityEngine.AudioSource The AudioSource on which the room size will be set.
room SpatialSoundRoomSizes The desired room size.
return void

SetUnityGainDistance() public static method

Sets the Spatial Sound unity gain distance.
public static SetUnityGainDistance ( AudioSource audioSource, float distance ) : void
audioSource UnityEngine.AudioSource The AudioSource on which the unity gain distance will be set.
distance float
return void