SourceSpawner creates fire-and-forget SpatialSources that play a given SoundToolKitSample at a given location and then dispose of themselves.
More...
|
List< SoundToolKitSample > | Samples [get, set] |
| List of SoundToolKitSamples that can be played by the spawned SoundToolKitSpatialSource More...
|
|
float | Volume [get, set] |
| Volume of the sound that will be played More...
|
|
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...
|
|
SoundSourceAttenuation | Attenuation [get, set] |
| The attenuation model which should be used by the spawned sources 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...
|
|
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...
|
|
SourceSpawner creates fire-and-forget SpatialSources that play a given SoundToolKitSample at a given location and then dispose of themselves.
◆ KillAllSpawnedSources()
void SoundToolKit.Unity.SoundToolKitSourceSpawner.KillAllSpawnedSources |
( |
| ) |
|
Destroys all of the SpatialSources spawned by this Spawner immediately.
◆ SpawnRandomSound()
void SoundToolKit.Unity.SoundToolKitSourceSpawner.SpawnRandomSound |
( |
Vector3? |
positionOfSpawn = null | ) |
|
Spawn a SoundToolKitSpatialSource playing a random SoundToolKitSample from the Samples list at a given position. The default position is that of component's parent GameObject.
- Parameters
-
positionOfSpawn | Position at which the Source is spawned. Defaults to the parent GameObject's position. |
◆ SpawnSound()
void SoundToolKit.Unity.SoundToolKitSourceSpawner.SpawnSound |
( |
SoundToolKitSample |
sampleToPlay, |
|
|
Vector3? |
positionOfSpawn = null |
|
) |
| |
Spawn a SoundToolKitSpatialSource playing a single given SoundToolKitSample at a given location. The default position is that of component's parent GameObject.
- Parameters
-
sampleToPlay | The Sample to be played by the spawned source. Pass an element on the Samples List or a SoundToolKitSample object. |
positionOfSpawn | Position at which the Source is spawned. Defaults to the parent GameObject's position. |
◆ Attenuation
SoundSourceAttenuation SoundToolKit.Unity.SoundToolKitSourceSpawner.Attenuation |
|
getset |
The attenuation model which should be used by the spawned sources
◆ HrtfSpatializationEnabled
bool SoundToolKit.Unity.SoundToolKitSourceSpawner.HrtfSpatializationEnabled |
|
getset |
◆ MaxDistance
float SoundToolKit.Unity.SoundToolKitSourceSpawner.MaxDistance |
|
getset |
Max distance of virtual sphere that simulates boundary of source volume This is only valid in Linear and ReverseLog Attenuation curve.
◆ Radius
float SoundToolKit.Unity.SoundToolKitSourceSpawner.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)
◆ Samples
◆ SimulationQuality
float SoundToolKit.Unity.SoundToolKitSourceSpawner.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
float SoundToolKit.Unity.SoundToolKitSourceSpawner.Volume |
|
getset |
Volume of the sound that will be played