Interface IAudioPlayer
Interface for Subtitler AudioPlayer, allowing you to use your own audio backend.
public interface IAudioPlayer
Methods
IsHearable()
Check whether this audio source is hearable right now.
bool IsHearable()
Returns
- bool
True if the audio source is hearable depending on volume, enabled, spatial mix and distance from listener, false otherwise.
Pause()
Pause this audio source.
void Pause()
PlayOneShot(object)
Play a single audio clip.
void PlayOneShot(object audio)
Parameters
audioobject
Resume()
Resume this audio source.
void Resume()
SetListener(object)
Set the listener used for calculating audio occlusion and spatialization.
void SetListener(object listener)
Parameters
listenerobject
SetTimeScale(float)
Set the TimeScale of this audio source. This is used to pause the audio source when the game is paused.
void SetTimeScale(float timeScale)
Parameters
timeScalefloat
Stop()
Stop this audio source.
void Stop()