ClockStone Audio Toolkit for Unity - Documentation
AudioControllerPlayAfter Method |
Plays an audio item with the name audioID right after the given AudioObject stops playing.
(see the Unity AudioSettings.dspTime documentation)
Namespace: (Default Namespace)
Assembly: AudioToolkit (in AudioToolkit.dll) Version: 8.2.0.0 (8.2.0.0)
Syntax
C#
public static AudioObject PlayAfter( string audioID, AudioObject playingAudio, double deltaDspTime = 0, float volume = 1f, float startTime = 0f )
Parameters
- audioID
- Type: SystemString
The audio ID. - playingAudio
- Type: (Default Namespace)AudioObject
Playback will start after this AudioObject finished playing - deltaDspTime (Optional)
- Type: SystemDouble
A time delta (high precision DSP time) at which to start playing. Negative values will cause audios to overlap. - volume (Optional)
- Type: SystemSingle
The volume between 0 and 1 [default=1]. - startTime (Optional)
- Type: SystemSingle
The start time seconds [default=0]
Return Value
Type: AudioObjectReturns the reference of the AudioObject that is used to play the audio item, or null if the audioID does not exist.
Remarks
Uses the PlayScheduled function only available in Unity v4.1 or newer that allows to stitch two audios together at DSP level precision without a gap.
Can not be used to chain more then one audio.
See Also