DemiLib
A collection of Demigiant's utility libraries for Unity (https://github.com/Demigiant/demilib)
DG.DeAudio.DeAudioSource Class Reference

Data connected to every AudioSource added by DeAudioManager More...

Inheritance diagram for DG.DeAudio.DeAudioSource:

Public Member Functions

void Dispose ()
 
void FadeFrom (float from, float duration=1.5f, bool ignoreTimeScale=true, TweenCallback onComplete=null)
 Fades this source's volume from the given value to its current one More...
 
void FadeIn (float duration=1.5f, bool ignoreTimeScale=true, TweenCallback onComplete=null)
 Fades in this source's volume More...
 
void FadeOut (float duration=1.5f, bool ignoreTimeScale=true, bool stopOnComplete=true, TweenCallback onComplete=null)
 Fades out this source's volume More...
 
void FadeTo (float to, float duration=1.5f, bool ignoreTimeScale=true, TweenCallback onComplete=null)
 Fades this source's volume to the given value More...
 
void Play (AudioClip clip, float volume=1, float pitch=1, bool loop=false)
 Play the given clip with the given options. Calling Play directly from a DeAudioSource overrides any lock that might've been set (though the locked status won't change) More...
 
void Play (DeAudioClipData clipData)
 Play the given clip with the stored volume, pitch and loop settings. Calling Play directly from a DeAudioSource overrides any lock that might've been set (though the locked status won't change) More...
 
void Stop ()
 Stops any sound connected to this source More...
 

Public Attributes

bool locked
 If TRUE, the AudioSource won't be reused until it's unlocked More...
 

Protected Member Functions

virtual void Dispose (bool disposing)
 

Properties

DeAudioGroup audioGroup [get]
 
AudioSource audioSource [get]
 
AudioClip clip [get]
 
bool isFree [get]
 TRUE if the audioSource is not playing and is not locked More...
 
bool isPlaying [get]
 
bool loop [get]
 
float pitch [get]
 
float unscaledVolume [get]
 Unscaled volume (doesn't include modifiers caused by global and group volumes) More...
 
float volume [get, set]
 Current volume (including modifiers caused by global and group volumes) More...
 

Detailed Description

Data connected to every AudioSource added by DeAudioManager

Member Function Documentation

void DG.DeAudio.DeAudioSource.Dispose ( )
virtual void DG.DeAudio.DeAudioSource.Dispose ( bool  disposing)
protectedvirtual
void DG.DeAudio.DeAudioSource.FadeFrom ( float  from,
float  duration = 1.5f,
bool  ignoreTimeScale = true,
TweenCallback  onComplete = null 
)

Fades this source's volume from the given value to its current one

void DG.DeAudio.DeAudioSource.FadeIn ( float  duration = 1.5f,
bool  ignoreTimeScale = true,
TweenCallback  onComplete = null 
)

Fades in this source's volume

void DG.DeAudio.DeAudioSource.FadeOut ( float  duration = 1.5f,
bool  ignoreTimeScale = true,
bool  stopOnComplete = true,
TweenCallback  onComplete = null 
)

Fades out this source's volume

void DG.DeAudio.DeAudioSource.FadeTo ( float  to,
float  duration = 1.5f,
bool  ignoreTimeScale = true,
TweenCallback  onComplete = null 
)

Fades this source's volume to the given value

void DG.DeAudio.DeAudioSource.Play ( AudioClip  clip,
float  volume = 1,
float  pitch = 1,
bool  loop = false 
)

Play the given clip with the given options. Calling Play directly from a DeAudioSource overrides any lock that might've been set (though the locked status won't change)

void DG.DeAudio.DeAudioSource.Play ( DeAudioClipData  clipData)

Play the given clip with the stored volume, pitch and loop settings. Calling Play directly from a DeAudioSource overrides any lock that might've been set (though the locked status won't change)

void DG.DeAudio.DeAudioSource.Stop ( )

Stops any sound connected to this source

Member Data Documentation

bool DG.DeAudio.DeAudioSource.locked

If TRUE, the AudioSource won't be reused until it's unlocked

Property Documentation

DeAudioGroup DG.DeAudio.DeAudioSource.audioGroup
get
AudioSource DG.DeAudio.DeAudioSource.audioSource
get
AudioClip DG.DeAudio.DeAudioSource.clip
get
bool DG.DeAudio.DeAudioSource.isFree
get

TRUE if the audioSource is not playing and is not locked

bool DG.DeAudio.DeAudioSource.isPlaying
get
bool DG.DeAudio.DeAudioSource.loop
get
float DG.DeAudio.DeAudioSource.pitch
get
float DG.DeAudio.DeAudioSource.unscaledVolume
get

Unscaled volume (doesn't include modifiers caused by global and group volumes)

float DG.DeAudio.DeAudioSource.volume
getset

Current volume (including modifiers caused by global and group volumes)


The documentation for this class was generated from the following file: