API reference
API reference
Select your platform
No SDKs available
No versions available

UnityAudioPlayer Class

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

Fields

AudioSource : AudioSource
Signature
AudioSource Meta.Voice.Audio.UnityAudioPlayer.AudioSource
CanSetElapsedSamples : override bool
Elapsed samples can be used for animation progress
Signature
override bool Meta.Voice.Audio.UnityAudioPlayer.CanSetElapsedSamples
CloneAudioSource : bool
Signature
bool Meta.Voice.Audio.UnityAudioPlayer.CloneAudioSource
ElapsedSamples : override int
The currently elapsed sample count
Signature
override int Meta.Voice.Audio.UnityAudioPlayer.ElapsedSamples
IsPlaying : override bool
Whether the player is currently playing back audio
Signature
override bool Meta.Voice.Audio.UnityAudioPlayer.IsPlaying

Protected Methods

Play ( offsetSamples )
Sets audio clip via an IAudioClipProvider or generates one if using a RawAudioClipStream. Then begins playback at a specified offset.
Signature
override void Meta.Voice.Audio.UnityAudioPlayer.Play(int offsetSamples=0)
Parameters
offsetSamples: int  The starting offset of the clip in samples
Returns
override void

Methods

GetPlaybackErrors ()
A string returned to describe any reasons playback is currently unavailable
Signature
override string Meta.Voice.Audio.UnityAudioPlayer.GetPlaybackErrors()
Returns
override string
Init ()
Performs all player initialization
Signature
override void Meta.Voice.Audio.UnityAudioPlayer.Init()
Returns
override void
Pause ()
Performs a pause if the current clip is playing
Signature
override void Meta.Voice.Audio.UnityAudioPlayer.Pause()
Returns
override void
Resume ()
Performs a resume if the current clip is paused
Signature
override void Meta.Voice.Audio.UnityAudioPlayer.Resume()
Returns
override void
Stop ()
Stops playback & removes the current clip reference
Signature
override void Meta.Voice.Audio.UnityAudioPlayer.Stop()
Returns
override void