AudioController.PlayAfter Method

Audio Toolkit

Collapse image Expand Image Copy image CopyHover image
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.0.0.0 (8.0.0.0)

Syntax

C#
public static AudioObject PlayAfter(
	string audioID,
	AudioObject playingAudio,
	double deltaDspTime = 0,
	float volume = 1f,
	float startTime = 0f
)

Parameters

audioID
Type: System..::..String
The audio ID.
playingAudio
Type: (Default Namespace)..::..AudioObject
Playback will start after this AudioObject finished playing
deltaDspTime (Optional)
Type: System..::..Double
A time delta (high precision DSP time) at which to start playing. Negative values will cause audios to overlap.
volume (Optional)
Type: System..::..Single
The volume between 0 and 1 [default=1].
startTime (Optional)
Type: System..::..Single
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.

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