This class contains the actual Audio Source, Unity Filter FX components and other convenience methods having to do with playing sound effects.
More...
|
delegate void | SoundFinishedEventHandler () |
| This event will notify you when a Variation ends
|
|
delegate void | SoundLoopedEventHandler (int loopNumberStarted) |
| Used for the SoundLooped event you can subscribe to
|
|
void | JumpToTime (float timeToJumpTo) |
| This method allows you to jump to a specific time in an already playing or just triggered Audio Clip. More...
|
|
void | GlideByPitch (float pitchAddition, float glideTime, System.Action completionCallback=null) |
| This method allows you to slowly change to a new pitch. More...
|
|
void | AdjustVolume (float volumePercentage) |
| This method allows you to adjust the volume of an already playing clip, accounting for bus volume, mixer volume and group volume. More...
|
|
void | Pause () |
| This method allows you to pause the audio being played by this Variation. This is automatically called by MasterAudio.PauseSoundGroup and MasterAudio.PauseBus.
|
|
void | Unpause () |
| This method allows you to unpause the audio being played by this Variation.
|
|
void | Stop (bool stopEndDetection=false, bool skipLinked=false) |
| This method allows you to stop the audio being played by this Variation. This will stop the sound immediately without respecting any fades. For fading out before stopping the sound: use FadeOutNow method instead and check "Sound Groups" under Fading Settings in the Advanced Settings section of Master Audio. More...
|
|
void | FadeToVolume (float newVolume, float fadeTime, System.Action completionCallback=null) |
| This method allows you to fade the sound from this Variation to a specified volume over X seconds. More...
|
|
void | FadeOutNowAndStop (System.Action completionCallback=null) |
| This method will fully fade out the sound from this Variation to zero using its existing fadeOutTime, then stop the Audio Source. More...
|
|
void | FadeOutNowAndStop (float fadeTime, System.Action completionCallback=null) |
| This method will fully fade out the sound from this Variation to zero using over X seconds. More...
|
|
|
TransformFollower | AmbientFollower [get] |
| This property returns you the TransformFollower component being used to position this Variation at closest collider points.
|
|
AudioDistortionFilter | DistortionFilter [get] |
| This property returns you a lazy-loaded reference to the Unity Distortion Filter FX component.
|
|
AudioReverbFilter | ReverbFilter [get] |
| This property returns you a lazy-loaded reference to the Unity Reverb Filter FX component.
|
|
AudioChorusFilter | ChorusFilter [get] |
| This property returns you a lazy-loaded reference to the Unity Chorus Filter FX component.
|
|
AudioEchoFilter | EchoFilter [get] |
| This property returns you a lazy-loaded reference to the Unity Echo Filter FX component.
|
|
AudioLowPassFilter | LowPassFilter [get, set] |
| This property returns you a reference to the Unity Low Pass Filter FX component.
|
|
AudioHighPassFilter | HighPassFilter [get] |
| This property returns you a lazy-loaded reference to the Unity High Pass Filter FX component.
|
|
bool | HasActiveFXFilter [get] |
| This property will return whether there are any Unity FX Filters enabled on this Variation.
|
|
float | OriginalPitch [get] |
| This property will return the original pitch of the Variation.
|
|
float | OriginalVolume [get] |
| This property will return the original volume of the Variation.
|
|
string | SoundGroupName [get] |
| This returns the name of the Sound Group the Variation belongs to.
|
|
float | LastTimePlayed [get, set] |
| This property will return the time of the last play of this Variation.
|
|
bool | ClipIsLoaded [get] |
| This property lets you know whether the clip is ready to play or not.
|
|
bool | IsPlaying [get] |
| This returns whether the clip is playing or not.
|
|
|
SoundFinishedEventHandler | SoundFinished |
| Subscribe to this event to be notified when the sound stops playing.
|
|
SoundLoopedEventHandler | SoundLooped |
| This event will notify you when a Variation loops (ends a loop and starts the same clip again via looping).
|
|
This class contains the actual Audio Source, Unity Filter FX components and other convenience methods having to do with playing sound effects.
◆ AdjustVolume()
void DarkTonic.MasterAudio.SoundGroupVariation.AdjustVolume |
( |
float |
volumePercentage | ) |
|
This method allows you to adjust the volume of an already playing clip, accounting for bus volume, mixer volume and group volume.
- Parameters
-
◆ FadeOutNowAndStop() [1/2]
void DarkTonic.MasterAudio.SoundGroupVariation.FadeOutNowAndStop |
( |
float |
fadeTime, |
|
|
System.Action |
completionCallback = null |
|
) |
| |
This method will fully fade out the sound from this Variation to zero using over X seconds.
- Parameters
-
fadeTime | The time it will take to fully fade to the target volume. |
completionCallback | (Optional) - a method to execute when the fade is complete. |
◆ FadeOutNowAndStop() [2/2]
void DarkTonic.MasterAudio.SoundGroupVariation.FadeOutNowAndStop |
( |
System.Action |
completionCallback = null | ) |
|
This method will fully fade out the sound from this Variation to zero using its existing fadeOutTime, then stop the Audio Source.
- Parameters
-
completionCallback | (Optional) - a method to execute when the fade is complete. |
◆ FadeToVolume()
void DarkTonic.MasterAudio.SoundGroupVariation.FadeToVolume |
( |
float |
newVolume, |
|
|
float |
fadeTime, |
|
|
System.Action |
completionCallback = null |
|
) |
| |
This method allows you to fade the sound from this Variation to a specified volume over X seconds.
- Parameters
-
newVolume | The target volume to fade to. |
fadeTime | The time it will take to fully fade to the target volume. |
completionCallback | (Optional) - a method to execute when the fade is complete. |
◆ GlideByPitch()
void DarkTonic.MasterAudio.SoundGroupVariation.GlideByPitch |
( |
float |
pitchAddition, |
|
|
float |
glideTime, |
|
|
System.Action |
completionCallback = null |
|
) |
| |
This method allows you to slowly change to a new pitch.
- Parameters
-
pitchAddition | The pitch to add to the current pitch. |
glideTime | The time it will take to change to that pitch. |
completionCallback | (Optional) - a method to execute when the pitch glide has completed. |
◆ JumpToTime()
void DarkTonic.MasterAudio.SoundGroupVariation.JumpToTime |
( |
float |
timeToJumpTo | ) |
|
This method allows you to jump to a specific time in an already playing or just triggered Audio Clip.
- Parameters
-
timeToJumpTo | The time in seconds to jump to. |
◆ Stop()
void DarkTonic.MasterAudio.SoundGroupVariation.Stop |
( |
bool |
stopEndDetection = false , |
|
|
bool |
skipLinked = false |
|
) |
| |
This method allows you to stop the audio being played by this Variation. This will stop the sound immediately without respecting any fades. For fading out before stopping the sound: use FadeOutNow method instead and check "Sound Groups" under Fading Settings in the Advanced Settings section of Master Audio.
- Parameters
-
stopEndDetection | Do not ever pass this in. |
skipLinked | Do not ever pass this in. |
The documentation for this class was generated from the following file:
- Assets/Plugins/DarkTonic/MasterAudio/Scripts/Settings/SoundGroupVariation.cs