SoundToolKit  1.5
SoundToolKit.Unity.SpatialComponent Class Reference

Base class for StkSpatialSource and StkStreamingSource. It contains common methods of SpatialSoundSource. More...

Inheritance diagram for SoundToolKit.Unity.SpatialComponent:
SoundToolKit.Unity.SourceComponent SoundToolKit.Unity.SoundToolKitSpatialSource SoundToolKit.Unity.SoundToolKitStreamingSource

Public Member Functions

override void OnStkInitialized (SoundToolKitManager soundToolKitManager)
 
- Public Member Functions inherited from SoundToolKit.Unity.SourceComponent
abstract void Play ()
 
abstract void Stop ()
 

Protected Member Functions

override void OnDestroy ()
 
- Protected Member Functions inherited from SoundToolKit.Unity.SourceComponent
abstract void Awake ()
 
abstract void OnDisable ()
 
abstract void OnEnable ()
 

Protected Attributes

float m_simulationQuality = 1f
 
bool m_hrtfSpatializationEnabled = true
 
float m_maxDistance = 300
 
float m_radius = 0.25f
 
SoundSourceAttenuation m_attenuation = SoundSourceAttenuation.InverseDistance
 
AnimationCurve m_attenuationCurve = AnimationCurve.Linear(0, 1, 300, 0)
 
SourceSpatial m_spatialSoundSource
 
- Protected Attributes inherited from SoundToolKit.Unity.SourceComponent
bool m_muted = false
 
float m_volume = 0.75f
 
bool m_isPlayingPreviousState
 

Properties

override bool? Muted [get, set]
 
override float? Volume [get, set]
 
float? SimulationQuality [get, set]
 This currently has no effect. Will be added in the future releases. Determines the quality of source processing. The value affects how many engine resources are delegated for processing sound emitted by this source. The simulation quality also determines the priority of given source, meaning, that sources with higher simulation quality can have lower latency. Quality in range 0 to 1.0, where: 1.0 - the best possible quality 0.0 - source not processed at all More...
 
bool? HrtfSpatializationEnabled [get, set]
 Enables/Disables HRTF's More...
 
AnimationCurve AttenuationCurve [get]
 The custom Attenuation curve interpreted from Unity's AnimationCurve. It will be used if Attenuation is set to Custom. Axis x represents distance while axis y represents attenuation in range 0 to 1.0, where: 1.0 - no attenuation 0.0 - full attenuation More...
 
float? MaxDistance [get, set]
 Max distance of virtual sphere that simulates boundary of source volume This is only valid in Linear and ReverseLog Attenuation curve. More...
 
float? Radius [get, set]
 Radius of virtual sphere that simulates boundary of source volume. This means that below this distance from source attenuation will not occur. Above that distance attenuation will be calculated according to chosen attenuation curve (see setAttenuation) More...
 
SoundSourceAttenuation? Attenuation [get, set]
 The attenuation model which should be used by this source More...
 
- Properties inherited from SoundToolKit.Unity.SourceComponent
bool Initialized [get, protected set]
 
abstract bool IsPlaying [get]
 
abstract bool Muted [get, set]
 
abstract float Volume [get, set]
 

Additional Inherited Members

- Public Attributes inherited from SoundToolKit.Unity.SourceComponent
bool playOnAwake = true
 

Detailed Description

Base class for StkSpatialSource and StkStreamingSource. It contains common methods of SpatialSoundSource.

Member Function Documentation

◆ OnDestroy()

override void SoundToolKit.Unity.SpatialComponent.OnDestroy ( )
protectedvirtual

◆ OnStkInitialized()

override void SoundToolKit.Unity.SpatialComponent.OnStkInitialized ( SoundToolKitManager  soundToolKitManager)
virtual

Member Data Documentation

◆ m_attenuation

SoundSourceAttenuation SoundToolKit.Unity.SpatialComponent.m_attenuation = SoundSourceAttenuation.InverseDistance
protected

◆ m_attenuationCurve

AnimationCurve SoundToolKit.Unity.SpatialComponent.m_attenuationCurve = AnimationCurve.Linear(0, 1, 300, 0)
protected

◆ m_hrtfSpatializationEnabled

bool SoundToolKit.Unity.SpatialComponent.m_hrtfSpatializationEnabled = true
protected

◆ m_maxDistance

float SoundToolKit.Unity.SpatialComponent.m_maxDistance = 300
protected

◆ m_radius

float SoundToolKit.Unity.SpatialComponent.m_radius = 0.25f
protected

◆ m_simulationQuality

float SoundToolKit.Unity.SpatialComponent.m_simulationQuality = 1f
protected

◆ m_spatialSoundSource

SourceSpatial SoundToolKit.Unity.SpatialComponent.m_spatialSoundSource
protected

Property Documentation

◆ Attenuation

SoundSourceAttenuation? SoundToolKit.Unity.SpatialComponent.Attenuation
getset

The attenuation model which should be used by this source

◆ AttenuationCurve

AnimationCurve SoundToolKit.Unity.SpatialComponent.AttenuationCurve
get

The custom Attenuation curve interpreted from Unity's AnimationCurve. It will be used if Attenuation is set to Custom. Axis x represents distance while axis y represents attenuation in range 0 to 1.0, where: 1.0 - no attenuation 0.0 - full attenuation

◆ HrtfSpatializationEnabled

bool? SoundToolKit.Unity.SpatialComponent.HrtfSpatializationEnabled
getset

Enables/Disables HRTF's

◆ MaxDistance

float? SoundToolKit.Unity.SpatialComponent.MaxDistance
getset

Max distance of virtual sphere that simulates boundary of source volume This is only valid in Linear and ReverseLog Attenuation curve.

◆ Muted

override bool? SoundToolKit.Unity.SpatialComponent.Muted
getset

◆ Radius

float? SoundToolKit.Unity.SpatialComponent.Radius
getset

Radius of virtual sphere that simulates boundary of source volume. This means that below this distance from source attenuation will not occur. Above that distance attenuation will be calculated according to chosen attenuation curve (see setAttenuation)

◆ SimulationQuality

float? SoundToolKit.Unity.SpatialComponent.SimulationQuality
getset

This currently has no effect. Will be added in the future releases. Determines the quality of source processing. The value affects how many engine resources are delegated for processing sound emitted by this source. The simulation quality also determines the priority of given source, meaning, that sources with higher simulation quality can have lower latency. Quality in range 0 to 1.0, where: 1.0 - the best possible quality 0.0 - source not processed at all

◆ Volume

override float? SoundToolKit.Unity.SpatialComponent.Volume
getset