AudioController.PlayAudioSubItem Method

ClockStone Audio Toolkit

AudioControllerPlayAudioSubItem Method

Plays a specific AudioSubItem.

Namespace:  (Default Namespace)
Assembly:  AudioToolkit (in AudioToolkit.dll) Version: 8.2.0.0 (8.2.0.0)
Syntax
C#
public AudioObject PlayAudioSubItem(
	AudioSubItem subItem,
	float volume,
	Vector3 worldPosition,
	Transform parentObj,
	float delay,
	float startTime,
	bool playWithoutAudioObject,
	AudioObject useExistingAudioObj,
	double dspTime = 0,
	bool playAsMusicOrAmbienceSound = false,
	float startVolumeMultiplier = 1f
)

Parameters

subItem
Type: (Default Namespace)AudioSubItem
the AudioSubItem
volume
Type: SystemSingle
the volume
worldPosition
Type: Vector3
the world position
parentObj
Type: Transform
the parent object, or null
delay
Type: SystemSingle
the delay in seconds
startTime
Type: SystemSingle
the start time seconds
playWithoutAudioObject
Type: SystemBoolean
if trueplays the audio by using the Unity function PlayOneShot without creating an audio game object. Allows playing audios from within the Unity inspector.
useExistingAudioObj
Type: (Default Namespace)AudioObject
if specified this existing audio object is used instead of creating a new AudioObject
dspTime (Optional)
Type: SystemDouble
The high precision DSP time at which to schedule playing the audio [default=0]
playAsMusicOrAmbienceSound (Optional)
Type: SystemBoolean
if trueplays the audio as music or ambience track [default=false]
startVolumeMultiplier (Optional)
Type: SystemSingle
allows to adjust the start volume if e.g. a FadeOut will follow immediately after

Return Value

Type: AudioObject
The created AudioObject or null
Remarks
This function is used by the editor extension and is normally not required for application developers. Use Play(String) instead.
See Also