API reference

UnityAudioPlayer Class

Unity specific audio player that will play any IAudioClipStream that includes an IAudioClipProvider or RawAudioClipStreams via AudioClip streaming.

Fields

AudioSource AudioSource[Get]
bool CloneAudioSource[Get]
Whether the player is currently playing back audio
Elapsed samples can be used for animation progress
The currently elapsed sample count

Member Functions

Performs all player initialization
A string returned to describe any reasons playback is currently unavailable
Performs a pause if the current clip is playing
Performs a resume if the current clip is paused
Stops playback & removes the current clip reference

Protected Functions

Sets audio clip via an IAudioClipProvider or generates one if using a RawAudioClipStream. Then begins playback at a specified offset.
Parameters
offsetSamples
The starting offset of the clip in samples