Table of Contents

Class AudioSourceData

Namespace
CodeBase.SoundSystem.Core
Assembly
4Experience.CodeBase.SoundSystem.Runtime.dll
[Serializable]
internal class AudioSourceData
Inheritance
AudioSourceData
Extension Methods

Constructors

AudioSourceData(AudioSource, AudioSourcePoolManager, SoundSourcePositionType, SoundType)

public AudioSourceData(AudioSource templateAudioSource, AudioSourcePoolManager poolManager, SoundSourcePositionType positionType, SoundType soundType)

Parameters

templateAudioSource AudioSource
poolManager AudioSourcePoolManager
positionType SoundSourcePositionType
soundType SoundType

Properties

CurrentAudioSource

private AudioSource CurrentAudioSource { get; set; }

Property Value

AudioSource

CurrentSoundType

private SoundType CurrentSoundType { get; set; }

Property Value

SoundType

ID

public int ID { get; private set; }

Property Value

int

LatestGeneratedID

private static int LatestGeneratedID { get; set; }

Property Value

int

PoolManager

private AudioSourcePoolManager PoolManager { get; set; }

Property Value

AudioSourcePoolManager

PositionType

private SoundSourcePositionType PositionType { get; set; }

Property Value

SoundSourcePositionType

TemplateAudioSource

private AudioSource TemplateAudioSource { get; set; }

Property Value

AudioSource

Methods

ClearCurrentFinishedSources()

public void ClearCurrentFinishedSources()

CreateCurrentAudioSource()

private void CreateCurrentAudioSource()

GenerateNextID()

private void GenerateNextID()

GetClipLenghtInSeconds()

public float GetClipLenghtInSeconds()

Returns

float

GetClipProgressInSeconds()

public float GetClipProgressInSeconds()

Returns

float

GetClipProgressNormalized()

public float GetClipProgressNormalized()

Returns

float

GetVolume()

public float GetVolume()

Returns

float

IsMuted()

public bool IsMuted()

Returns

bool

IsPlaying()

public bool IsPlaying()

Returns

bool

IsStopped()

public bool IsStopped()

Returns

bool

Mute()

public void Mute()

Pause()

public void Pause()

SetClipProgress(float)

public void SetClipProgress(float startClipProgress)

Parameters

startClipProgress float

SetClipTime(float)

public void SetClipTime(float startTimeInSeconds)

Parameters

startTimeInSeconds float

SetOutputAudioMixerGroup(AudioMixerGroup)

public void SetOutputAudioMixerGroup(AudioMixerGroup audioMixerGroup)

Parameters

audioMixerGroup AudioMixerGroup

SetSourcePosition(Transform)

public void SetSourcePosition(Transform soundComponentTransform)

Parameters

soundComponentTransform Transform

SetVolume(float)

public void SetVolume(float volume)

Parameters

volume float

SetupCurrentAudioSource(AudioClip, bool, bool)

private void SetupCurrentAudioSource(AudioClip clip, bool isMuted, bool isLooping)

Parameters

clip AudioClip
isMuted bool
isLooping bool

Stop()

public void Stop()

TryPlay(out int, AudioClip, bool, bool, Transform)

public bool TryPlay(out int soundID, AudioClip clip, bool isMuted, bool isLooping, Transform soundComponentTransform)

Parameters

soundID int
clip AudioClip
isMuted bool
isLooping bool
soundComponentTransform Transform

Returns

bool

Unmute()

public void Unmute()

Unpause()

public void Unpause()