Table of Contents

Class UnityAudioAdapter

Namespace
Gasimo.Subtitles
Assembly
Gasimo.Subtitler.dll

Unity implementation of the IAudioPlayer interface allowing you to play AudioClips through the AudioSource component using Subtitler.

public class UnityAudioAdapter : IAudioPlayer
Inheritance
object
UnityAudioAdapter
Implements

Constructors

UnityAudioAdapter(AudioSource)

public UnityAudioAdapter(AudioSource audioSource)

Parameters

audioSource AudioSource

UnityAudioAdapter(AudioSource, AudioListener)

public UnityAudioAdapter(AudioSource audioSource, AudioListener listener)

Parameters

audioSource AudioSource
listener AudioListener

Properties

listener

public AudioListener listener { get; }

Property Value

AudioListener

Methods

IsHearable()

Check whether this audio source is hearable right now.

public 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.

public void Pause()

PlayOneShot(object)

Play a single audio clip.

public void PlayOneShot(object audio)

Parameters

audio object

Resume()

Resume this audio source.

public void Resume()

SetListener(object)

Set the listener used for calculating audio occlusion and spatialization.

public void SetListener(object listener)

Parameters

listener object

SetTimeScale(float)

Set the TimeScale of this audio source. This is used to pause the audio source when the game is paused.

public void SetTimeScale(float timeScale)

Parameters

timeScale float

Stop()

Stop this audio source.

public void Stop()