AudioItem Class

ClockStone Audio Toolkit

AudioItem Class

The AudioItem class represents a uniquely named audio entity that can be played by scripts.
Inheritance Hierarchy
SystemObject  (Default Namespace)AudioItem

Namespace:  (Default Namespace)
Assembly:  AudioToolkit (in AudioToolkit.dll) Version: 8.2.0.0 (8.2.0.0)
Syntax
C#
[SerializableAttribute]
public class AudioItem

The AudioItem type exposes the following members.

Constructors
  NameDescription
Public methodAudioItem
Initializes a new instance of the AudioItem class
Public methodAudioItem(AudioItem)
Copy constructor
Top
Properties
  NameDescription
Public propertycategory
the AudioCategroy the audio item belongs to.
Top
Methods
  NameDescription
Public methodResetSequence
Resets the sub-item sequence. (So if you are using a sequence mode the first sub-item will be played next)
Public methodUnloadAudioClip
Unloads the AudioClip from memory.
Top
Fields
  NameDescription
Public fieldaudioSource_MaxDistance
Overrides the AudioSource MaxDistance value if overrideAudioSourceSettings is enabled.
Public fieldaudioSource_MinDistance
Overrides the AudioSource MinDistance value if overrideAudioSourceSettings is enabled.
Public fieldDelay
Defers the playback of the audio item for Delay seconds.
Public fieldDestroyOnLoad
If disabled, the audio will keep on playing if a new scene is loaded.
Public fieldLoop
If enabled the audio item will get looped when played.
Public fieldloopSequenceCount
The number of sub-items to be played in the loop modes LoopSequence.
Public fieldloopSequenceOverlap
Specifies a time overlap for the LoopSequence
Public fieldloopSequenceRandomDelay
Specifies a random delay for the LoopSequence
Public fieldloopSequenceRandomPitch
Specifies a random pitch for the LoopSequence
Public fieldloopSequenceRandomVolume
Specifies a random volume for the LoopSequence
Public fieldMaxInstanceCount
Assures that the same audio item will not be played more than MaxInstanceCount times simultaneously.
Public fieldMinTimeBetweenPlayCalls
Assures that the same audio item will not be played multiple times within this time frame. This is useful if several events triggered at almost the same time want to play the same audio item which can cause unwanted noise artifacts.
Public fieldName
The unique name of the audio item ( = audioID )
Public fieldoverrideAudioSourceSettings
If enabled you can specify specific AudioSource settings
Public fieldRandomDelay
This is the general random delay variation for the sub items in this audio item
Public fieldRandomPitch
This is the general random pitch variation for the sub items in this audio item
Public fieldRandomVolume
This is the general random volume variation for the sub items in this audio item
Public fieldspatialBlend
Overrides the AudioSource spatialBlend value (0=2D 1=3D)
Public fieldSubItemPickMode
Determines which AudioSubItem is chosen when playing an AudioItem
Public fieldsubItems
Define your audio sub-items using the Unity inspector.
Public fieldVolume
The volume applied to all audio sub-items of this audio item.
Top
Remarks
AudioItem objects are defined in an AudioCategory using the Unity inspector.
See Also