Click or drag to resize

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: (
public static AudioObject PlayAfter(
	string audioID,
	AudioObject playingAudio,
	double deltaDspTime = 0,
	float volume = 1f,
	float startTime = 0f


Type: SystemString
The audio ID.
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: AudioObject
Returns the reference of the AudioObject that is used to play the audio item, or null if the audioID does not exist.
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