AudioObject Methods

Audio Toolkit

Collapse image Expand Image Copy image CopyHover image

The AudioObject type exposes the following members.

Methods

  Name Description
Public method DestroyAudioObject
Destroys the audio object (using ObjectPoolController if pooling is enabled)
Public method DoesBelongToCategory
Checks if this AudioObject belongs to a specific category
Public method FadeIn
Fades-in a playing audio.
Public method FadeOut(Single)
Starts a fade-out. If the AudioItem mode is is a sequence, the next sub-item will continue to play after the this sub-item is completely faded out.
Public method FadeOut(Single, Single)
Starts a fade-out at a specified time. If the AudioItem mode is is a sequence, the next sub-item will continue to play after the this sub-item is completely faded out.
Public method FinishSequence
Finishes a playing sequence, depending on the AudioItem's loop mode :
  • LoopSequence: The sequence will stop after the current item has finished playing
  • PlaySequenceAndLoopLast: The sequence will stop after the current item has finished playing. If the sequence is during the looping part the looping will stop after the current loop reached its end.
  • IntroLoopOutroSequence: The sequence will stop after the current item has finished playing. If the sequence is during the looping part the outro will be played and the sequence will stop afterwards.
Public method Static member InverseTransformPitch
Inverse pitch transformation: TransformPitch(Single)
Public method Static member InverseTransformVolume
Inverse volume transformation TransformVolume(Single)
Public method IsPaused
Determines whether the audio clip is paused.
Public method IsPlaying
Determines if either the primary or the secondary audio clip is playing.
Public method IsPrimaryPlaying
Determines if the primary audio clip is playing.
Public method IsSecondaryPlaying
Determines if the secondary audio clip is playing.
Public method Pause()()()()
Pauses the audio clip.
Public method Pause(Single)
Pauses the audio clip with a fade-out.
Public method Play
Plays the audio clip with the specified delay.
Public method PlayAfter
Plays the specified audio after the current has finished playing
Public method PlayNow
Plays the specified audio.
Public method PlayScheduled
Plays the audio clip at the specified high precision DSP time (see the Unity AudioSettings.dspTime documentation)
Public method Stop()()()()
Stops playing this instance.
Public method Stop(Single)
Stops a playing audio with fade-out.
Public method Stop(Single, Single)
Stops a playing audio with fade-out at a specified time.
Public method SwitchAudioSources
Switches the primary and secondary audio source
Public method Static member TransformPitch
Transforms the pitch from semitones to a multiplicative factor
Public method Static member TransformVolume
Transforms the volume to make it perceptually more intuitive to scale and cross-fade.
Public method Unpause()()()()
Unpauses the audio clip.
Public method Unpause(Single)
Unpauses the audio clip with a fade-in.

See Also