SoundToolKit  1.5
SoundToolKit.Unity.SoundToolKitStreamingSource Class Reference

This component wraps Virtual SpatialSoundSource from SoundToolKit however only allows to play streaming samples. StkStreamingSource takes into account StkMeshes to generate sound. More...

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

Public Member Functions

override void OnStkInitialized (SoundToolKitManager soundToolKitManager)
 
override void Play ()
 
override void Stop ()
 
void EnqueueSamples (float[] samples)
 Streams (enqueues) interleaved samples. More...
 
void EnqueueSamples (float[][] samples)
 Streams (enqueues) samples. More...
 
- Public Member Functions inherited from SoundToolKit.Unity.SpatialComponent
override void OnStkInitialized (SoundToolKitManager soundToolKitManager)
 

Protected Member Functions

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

Properties

override bool? IsPlaying [get]
 
- Properties inherited from SoundToolKit.Unity.SpatialComponent
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]
 

Events

Action< SoundToolKitStreamingSourceOnPaused
 
Action< SoundToolKitStreamingSourceOnStarted
 
Action< SoundToolKitStreamingSourceOnEnded
 

Additional Inherited Members

- Public Attributes inherited from SoundToolKit.Unity.SourceComponent
bool playOnAwake = true
 
- Protected Attributes inherited from SoundToolKit.Unity.SpatialComponent
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
 

Detailed Description

This component wraps Virtual SpatialSoundSource from SoundToolKit however only allows to play streaming samples. StkStreamingSource takes into account StkMeshes to generate sound.

Member Function Documentation

◆ Awake()

override void SoundToolKit.Unity.SoundToolKitStreamingSource.Awake ( )
protectedvirtual

◆ EnqueueSamples() [1/2]

void SoundToolKit.Unity.SoundToolKitStreamingSource.EnqueueSamples ( float []  samples)

Streams (enqueues) interleaved samples.

Parameters
samplesToEnqueueInterleaved, raw samples buffer.

◆ EnqueueSamples() [2/2]

void SoundToolKit.Unity.SoundToolKitStreamingSource.EnqueueSamples ( float  samples[][])

Streams (enqueues) samples.

Parameters
samplesToEnqueueBuffer of samples.

◆ OnDestroy()

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

◆ OnDisable()

override void SoundToolKit.Unity.SoundToolKitStreamingSource.OnDisable ( )
protectedvirtual

◆ OnEnable()

override void SoundToolKit.Unity.SoundToolKitStreamingSource.OnEnable ( )
protectedvirtual

◆ OnStkInitialized()

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

◆ Play()

override void SoundToolKit.Unity.SoundToolKitStreamingSource.Play ( )
virtual

◆ Stop()

override void SoundToolKit.Unity.SoundToolKitStreamingSource.Stop ( )
virtual

Property Documentation

◆ IsPlaying

override bool? SoundToolKit.Unity.SoundToolKitStreamingSource.IsPlaying
get

Event Documentation

◆ OnEnded

Action<SoundToolKitStreamingSource> SoundToolKit.Unity.SoundToolKitStreamingSource.OnEnded

◆ OnPaused

Action<SoundToolKitStreamingSource> SoundToolKit.Unity.SoundToolKitStreamingSource.OnPaused

◆ OnStarted

Action<SoundToolKitStreamingSource> SoundToolKit.Unity.SoundToolKitStreamingSource.OnStarted