Master Audio Multiplayer  1.3.8
The ONLY audio framework with extensive turnkey multiplayer features!
DarkTonic.MasterAudio.MasterAudio Class Reference

This class contains the heart of the Master Audio API. There are also convenience methods here for Playlist Controllers, even though you can call those methods on the Playlist Controller itself as well. More...

Inheritance diagram for DarkTonic.MasterAudio.MasterAudio:

Public Types

enum  AudioLocation { Clip, ResourceFile }
 This setting lets you choose where the Audio Clip lives: Clip, Resource File or Addressable More...
 
enum  CustomSongStartTimeMode { Beginning, SpecificTime, RandomTime }
 This controls where the song starts, Beginning, Specific Time or Random Time. More...
 

Static Public Member Functions

static void PerformDelayedAmbientTriggers ()
 Will trigger an Ambient Sound a frame later than it is enabled. This is to avoid it happening when not intended such as when placed on an object that is Instantiated disabled for pooling. More...
 
static bool PlaySoundAndForget (string sType, float volumePercentage=1f, float?pitch=null, float delaySoundTime=0f, string variationName=null, double?timeToSchedulePlay=null)
 This method allows you to play a sound in a Sound Group in the location of the Master Audio prefab. Returns bool indicating success (played) or not. More...
 
static PlaySoundResult PlaySound (string sType, float volumePercentage=1f, float?pitch=null, float delaySoundTime=0f, string variationName=null, double?timeToSchedulePlay=null, bool isChaining=false, bool isSingleSubscribedPlay=false)
 This method allows you to play a sound in a Sound Group in the location of the Master Audio prefab. Returns a PlaySoundResult object. More...
 
static bool PlaySound3DAtVector3AndForget (string sType, Vector3 sourcePosition, float volumePercentage=1f, float?pitch=null, float delaySoundTime=0f, string variationName=null, double?timeToSchedulePlay=null)
 This method allows you to play a sound in a Sound Group from a specific Vector 3 position. Returns bool indicating success (played) or not. More...
 
static PlaySoundResult PlaySound3DAtVector3 (string sType, Vector3 sourcePosition, float volumePercentage=1f, float?pitch=null, float delaySoundTime=0f, string variationName=null, double?timeToSchedulePlay=null)
 This method allows you to play a sound in a Sound Group from a specific Vector3 position. Returns a PlaySoundResult object. More...
 
static bool PlaySound3DAtTransformAndForget (string sType, Transform sourceTrans, float volumePercentage=1f, float?pitch=null, float delaySoundTime=0f, string variationName=null, double?timeToSchedulePlay=null)
 This method allows you to play a sound in a Sound Group from a specific position - the position of a Transform you pass in. Returns bool indicating success (played) or not. More...
 
static PlaySoundResult PlaySound3DAtTransform (string sType, Transform sourceTrans, float volumePercentage=1f, float?pitch=null, float delaySoundTime=0f, string variationName=null, double?timeToSchedulePlay=null, bool isChaining=false, bool isSingleSubscribedPlay=false)
 This method allows you to play a sound in a Sound Group from a specific position - the position of a Transform you pass in. More...
 
static bool PlaySound3DFollowTransformAndForget (string sType, Transform sourceTrans, float volumePercentage=1f, float?pitch=null, float delaySoundTime=0f, string variationName=null, double?timeToSchedulePlay=null)
 This method allows you to play a sound in a Sound Group from a specific position - a Transform you pass in. Returns bool indicating success (played) or not. More...
 
static PlaySoundResult PlaySound3DFollowTransform (string sType, Transform sourceTrans, float volumePercentage=1f, float?pitch=null, float delaySoundTime=0f, string variationName=null, double?timeToSchedulePlay=null, bool isChaining=false, bool isSingleSubscribedPlay=false)
 This method allows you to play a sound in a Sound Group from a specific position - a Transform you pass in, and it will follow the Transform if it moves. Returns a PlaySoundResult. More...
 
static IEnumerator PlaySoundAndWaitUntilFinished (string sType, float volumePercentage=1f, float?pitch=null, float delaySoundTime=0f, string variationName=null, System.Action completedAction=null)
 This method allows you to play a sound in a Sound Group from the location of Master Audio. This method will not return until the sound is finished (or cannot play) to continue execution. You need to call this with StartCoroutine. The sound will not be played looped, since that could cause a Coroutine that would never end. More...
 
static IEnumerator PlaySound3DAtTransformAndWaitUntilFinished (string sType, Transform sourceTrans, float volumePercentage=1f, float?pitch=null, float delaySoundTime=0f, string variationName=null, double?timeToSchedulePlay=null, System.Action completedAction=null)
 This method allows you to play a sound in a Sound Group from a specific position - a Transform you pass in. This method will not return until the sound is finished (or cannot play) to continue execution. You need to call this with StartCoroutine. The sound will not be played looped, since that could cause a Coroutine that would never end. More...
 
static IEnumerator PlaySound3DFollowTransformAndWaitUntilFinished (string sType, Transform sourceTrans, float volumePercentage=1f, float?pitch=null, float delaySoundTime=0f, string variationName=null, double?timeToSchedulePlay=null, System.Action completedAction=null)
 This method allows you to play a sound in a Sound Group from a specific position - a Transform you pass in, and it will follow the Transform if it moves. This method will not return until the sound is finished (or cannot play) to continue execution. You need to call this with StartCoroutine. The sound will not be played looped, since that could cause a Coroutine that would never end. More...
 
static void StopAllSoundsOfTransform (Transform sourceTrans)
 This method allows you to abruptly stop all sounds triggered by or following a Transform. More...
 
static void StopSoundGroupOfTransform (Transform sourceTrans, string sType)
 This method allows you to abruptly stop all sounds of a particular Sound Group triggered by or following a Transform. More...
 
static void PauseAllSoundsOfTransform (Transform sourceTrans)
 This method allows you to pause all sounds triggered by or following a Transform. More...
 
static void PauseSoundGroupOfTransform (Transform sourceTrans, string sType)
 This method allows you to pause all sounds of a particular Sound Group triggered by or following a Transform. More...
 
static void UnpauseAllSoundsOfTransform (Transform sourceTrans)
 This method allows you to unpause all sounds triggered by or following a Transform. More...
 
static void UnpauseSoundGroupOfTransform (Transform sourceTrans, string sType)
 This method allows you to unpause all sounds of a particular Sound Group triggered by or following a Transform. More...
 
static void FadeOutAllSoundsOfTransform (Transform sourceTrans, float fadeTime)
 This method allows you to fade out all sounds triggered by or following a Transform for X seconds. More...
 
static void FadeOutSoundGroupOfTransform (Transform sourceTrans, string sType, float fadeTime)
 This method allows you to fade out all sounds of a particular Sound Group triggered by or following a Transform for X seconds. More...
 
static void StopAllOfSound (string sType)
 This method allows you to abruptly stop all sounds in a specified Sound Group. More...
 
static void FadeOutAllOfSound (string sType, float fadeTime)
 This method allows you to fade out all sounds in a specified Sound Group for X seconds. This uses each Variation's fade command. If you want to Fade a Sound Group with the Group volume, use FadeSoundGroupToVolume More...
 
static List< SoundGroupVariationGetAllPlayingVariations ()
 Returns a list of all Variation scripts that are currently playing a sound. More...
 
static List< SoundGroupVariationGetAllPlayingVariationsOfTransform (Transform sourceTrans)
 This will return a list of all playing Variations of a Transform More...
 
static List< SoundGroupVariationGetAllPlayingVariationsOfTransformList (List< Transform > sourceTransList)
 This will return a list of all playing Variations of a list of Transforms More...
 
static List< SoundGroupVariationGetAllPlayingVariationsInBus (string busName)
 Returns a list of all Variation scripts that are currently playing through a bus. More...
 
static void DeleteGroupVariation (string sType, string variationName)
 This method will delete a variation from a Sound Group during runtime. More...
 
static void CreateGroupVariationFromClip (string sType, AudioClip clip, string variationName, float volume=1f, float pitch=1f)
 This method will add the variation to a Sound Group during runtime. More...
 
static void ChangeVariationPitch (string sType, bool changeAllVariations, string variationName, float pitch)
 This method will change the pitch of a variation or all variations in a Sound Group. More...
 
static void ChangeVariationVolume (string sType, bool changeAllVariations, string variationName, float volume)
 This method will change the volume of a variation or all variations in a Sound Group. More...
 
static void ChangeVariationClipFromResources (string sType, bool changeAllVariations, string variationName, string resourceFileName)
 This method will change the Audio Clip used by a variation into one named from a Resource file. More...
 
static void ChangeVariationClip (string sType, bool changeAllVariations, string variationName, AudioClip clip)
 This method will change the Audio Clip used by a variation into one you specify. More...
 
static void GradualOcclusionFreqChange (SoundGroupVariation variation, float fadeTime, float newCutoffFreq)
 This method will gradually change the cutoff frequency of an occluded Variation More...
 
static AudioSource GetNextVariationForSoundGroup (string sType)
 This returns the AudioSource for the next Variation to be played. Only works for top-to-bottom Variation Sequence. More...
 
static bool IsSoundGroupPlaying (string sType)
 Returns true or false, telling you true if a Sound Group is playing any voices. More...
 
static bool IsTransformPlayingSoundGroup (string sType, Transform sourceTrans)
 Will return whether the Sound Group you specify is played by a Transform you pass in. More...
 
static void RouteGroupToBus (string sType, string busName)
 Change the bus of a Sound Group. More...
 
static float GetVariationLength (string sType, string variationName)
 This method will return the length in seconds of a Variation in a Sound Group. More...
 
static void RefillSoundGroupPool (string sType)
 This method allows you to refill the pool of the Variation sounds for a Sound Group. That way you don't have to wait for all remaining random (or top to bottom) sounds to be played before it refills. More...
 
static bool SoundGroupExists (string sType)
 This method allows you to check if a Sound Group exists. More...
 
static void PauseSoundGroup (string sType)
 This method allows you to pause all Audio Sources in a Sound Group. More...
 
static void UnpauseSoundGroup (string sType)
 This method allows you to unpause all Audio Sources in a Sound Group. More...
 
static void FadeSoundGroupToVolume (string sType, float newVolume, float fadeTime, System.Action completionCallback=null, bool willStopAfterFade=false, bool willResetVolumeAfterFade=false)
 This method allows you to fade the volume of a Sound Group over X seconds. More...
 
static void FadeOutOldSoundGroupVoices (string sType, float minimumPlayTime, float fadeTime)
 This method allows you to fade out voices on a Sound Group that have been playing for at least X seconds. More...
 
static void StopOldSoundGroupVoices (string sType, float minimumPlayTime)
 This method allows you to stop voices on a Sound Group that have been playing for at least X seconds. More...
 
static void GlideSoundGroupByPitch (string sType, float pitchAddition, float glideTime, System.Action completionCallback=null)
 This method allows you to glide the pitch of each Variation of a Sound Group over X seconds by a specified amount. More...
 
static void DeleteSoundGroup (string sType)
 This method will delete a Sound Group, and all variations from the current Scene's Master Audio object. More...
 
static Transform CreateSoundGroup (DynamicSoundGroup aGroup, int?creatorInstanceId, bool errorOnExisting=true)
 This method will create a new Sound Group from the Audio Clips you pass in. More...
 
static float GetGroupVolume (string sType)
 This will return the volume of a Sound Group. More...
 
static void SetGroupVolume (string sType, float volumeLevel)
 This method will set the volume of a Sound Group. More...
 
static void MuteGroup (string sType, bool shouldCheckMuteStatus=true)
 This method will mute all variations in a Sound Group. More...
 
static void UnmuteGroup (string sType, bool shouldCheckMuteStatus=true)
 This method will unmute all variations in a Sound Group More...
 
static void SoloGroup (string sType, bool shouldCheckMuteStatus=true)
 This method will solo a Sound Group. If anything is soloed, only soloed Sound Groups will be heard. More...
 
static void UnsoloGroup (string sType, bool shouldCheckMuteStatus=true)
 This method will unsolo a Sound Group. More...
 
static MasterAudioGroup GrabGroup (string sType, bool logIfMissing=true)
 This method will return the Sound Group settings for examination purposes. More...
 
static int VoicesForGroup (string sType)
 Returns total number of Audio Sources for this Sound Group. More...
 
static AudioGroupInfo GetGroupInfo (string sType)
 This method will return the Audio Group Info settings for examination purposes. Use on during play in editor, not during edit. More...
 
static void SubscribeToLastVariationPlayed (string sType, System.Action finishedCallback)
 Use this method if you want to be notified when the last Variation in a Sound Group has finished playing (all have played). More...
 
static void UnsubscribeFromLastVariationPlayed (string sType)
 Use this method to cease notifications added by SubscribeToLastVariationPlayed. More...
 
static void PauseMixer ()
 This method allows you to pause all Audio Sources in the mixer (everything but Playlists). More...
 
static void UnpauseMixer ()
 This method allows you to unpause all Audio Sources in the mixer (everything but Playlists). More...
 
static void StopMixer ()
 This method allows you to stop all Audio Sources in the mixer (everything but Playlists). More...
 
static void UnsubscribeFromAllVariations ()
 This method allows you to unsubscribe from all SoundFinished events in the entire MA hierarchy in your Scene. More...
 
static void StopEverything ()
 This method allows you to stop all Audio Sources in the mixer and Playlists as well. More...
 
static void PauseEverything ()
 This method allows you to pause all Audio Sources in the mixer and Playlists as well. More...
 
static void UnpauseEverything ()
 This method allows you to unpause all Audio Sources in the mixer and Playlists as well. More...
 
static void MuteEverything ()
 This method allows you to mute all Audio Sources in the mixer and Playlists as well. More...
 
static void UnmuteEverything ()
 This method allows you to unmute all Audio Sources in the mixer and Playlists as well. More...
 
static List< string > ListOfAudioClipsInGroupsEditTime ()
 This provides a list of of all audio clip names used in all Sound Groups, at edit time. More...
 
static void ChangeBusPitch (string busName, float pitch)
 This method allows you to change the pitch of all Variations in all Groups in a bus. More...
 
static void MuteBus (string busName)
 This method allows you to mute all Groups in a bus. More...
 
static void UnmuteBus (string busName, bool shouldCheckMuteStatus=true)
 This method allows you to unmute all Groups in a bus. More...
 
static void ToggleMuteBus (string busName)
 This will mute the bus if unmuted, and vice versa More...
 
static void PauseBus (string busName)
 This method allows you to pause all Audio Sources in a bus. More...
 
static void SoloBus (string busName)
 This method allows you to solo all Groups in a bus. More...
 
static void UnsoloBus (string busName, bool shouldCheckMuteStatus=true)
 This method allows you to unsolo all Groups in a bus. More...
 
static void StopBus (string busName)
 This method allows you to stop all Audio Sources in a bus. More...
 
static void UnpauseBus (string busName)
 This method allows you to unpause all paused Audio Sources in a bus. More...
 
static bool CreateBus (string busName, int?actorInstanceId, bool errorOnExisting=true, bool isTemporary=false)
 This method will create a new bus with the name you specify. More...
 
static void DeleteBusByName (string busName)
 This method will delete a bus by name. More...
 
static float GetBusVolume (MasterAudioGroup maGroup)
 This method will return the bus volume of a specified Sound Group, if any. If the Group is not in a bus, this will return 1. More...
 
static void FadeBusToVolume (string busName, float newVolume, float fadeTime, System.Action completionCallback=null, bool willStopAfterFade=false, bool willResetVolumeAfterFade=false)
 This method allows you to fade the volume of a bus over X seconds. More...
 
static void FadeOutOldBusVoices (string busName, float minimumPlayTime, float fadeTime)
 This method allows you to fade out voices on a Bus that have been playing for at least X seconds. More...
 
static void StopOldBusVoices (string busName, float minimumPlayTime)
 This method allows you to stop voices on a Bus that have been playing for at least X seconds. More...
 
static void GlideBusByPitch (string busName, float pitchAddition, float glideTime, System.Action completionCallback=null)
 This method allows you to glide the pitch of each playing Variation on each Sound Group assigned to a Bus over X seconds. More...
 
static void SetBusVolumeByName (string busName, float newVolume)
 This method will set the volume of a bus. More...
 
static GroupBus GrabBusByName (string busName)
 This method will return the settings of a bus. More...
 
static void PauseBusOfTransform (Transform sourceTrans, string busName)
 This method allows you to pause all sounds of a particular Bus triggered by or following a Transform More...
 
static void UnpauseBusOfTransform (Transform sourceTrans, string busName)
 This method allows you to unpause all sounds of a particular Bus triggered by or following a Transform More...
 
static void StopBusOfTransform (Transform sourceTrans, string busName)
 This method allows you to stop all sounds of a particular Bus triggered by or following a Transform More...
 
static void AddSoundGroupToDuckList (string sType, float riseVolumeStart, float duckedVolCut, float unduckTime, bool isTemporary=false)
 This method will allow you to add a Sound Group to the list of sounds that cause music in the Playlist to duck. More...
 
static void RemoveSoundGroupFromDuckList (string sType)
 This method will allow you to remove a Sound Group from the list of sounds that cause music in the Playlist to duck. More...
 
static Playlist GrabPlaylist (string playlistName, bool logErrorIfNotFound=true)
 This method will find a Playlist by name and return it to you. More...
 
static void ChangePlaylistPitch (string playlistName, float pitch, string songName=null)
 This method will change the pitch of all clips in a Playlist, or a single song if you specify the song name. More...
 
static void MutePlaylist ()
 This method will allow you to mute your Playlist Controller. You should not use this if you have more than one Playlist Controller. Use the overloaded method instead, it takes a playlistControllerName parameter. More...
 
static void MutePlaylist (string playlistControllerName)
 This method will allow you to mute a Playlist Controller by name. More...
 
static void MuteAllPlaylists ()
 This method will allow you to mute all Playlist Controllers. More...
 
static void UnmutePlaylist ()
 This method will allow you to unmute your Playlist Controller. You should not use this if you have more than one Playlist Controller. Use the overloaded method instead, it takes a playlistControllerName parameter. More...
 
static void UnmutePlaylist (string playlistControllerName)
 This method will allow you to unmute a Playlist Controller by name. More...
 
static void UnmuteAllPlaylists ()
 This method will allow you to unmute all Playlist Controllers. More...
 
static void ToggleMutePlaylist ()
 This method will allow you to toggle mute on your Playlist Controller. You should not use this if you have more than one Playlist Controller. Use the overloaded method instead, it takes a playlistControllerName parameter. More...
 
static void ToggleMutePlaylist (string playlistControllerName)
 This method will allow you to toggle mute on a Playlist Controller by name. More...
 
static void ToggleMuteAllPlaylists ()
 This method will allow you to toggle mute on all Playlist Controllers. More...
 
static void PausePlaylist ()
 This method will allow you to pause your Playlist Controller. You should not use this if you have more than one Playlist Controller. Use the overloaded method instead, it takes a playlistControllerName parameter. More...
 
static void PausePlaylist (string playlistControllerName)
 This method will allow you to pause a Playlist Controller by name. More...
 
static void PauseAllPlaylists ()
 This method will allow you to pause all Playlist Controllers. More...
 
static void UnpausePlaylist ()
 This method will allow you to unpause a paused Playlist Controller. You should not use this if you have more than one Playlist Controller. Use the overloaded method instead, it takes a playlistControllerName parameter. More...
 
static void UnpausePlaylist (string playlistControllerName)
 This method will allow you to unpause a paused Playlist Controller by name. More...
 
static void UnpauseAllPlaylists ()
 This method will allow you to unpause all paused Playlist Controllers. More...
 
static void StopPlaylist ()
 This method will stop a Playlist Controller. You should not use this if you have more than one Playlist Controller. Use the overloaded method instead, it takes a playlistControllerName parameter. More...
 
static void StopPlaylist (string playlistControllerName)
 This method will stop a Playlist Controller by name. More...
 
static void StopAllPlaylists ()
 This method will allow you to stop all Playlist Controllers. More...
 
static void TriggerNextPlaylistClip ()
 This method will advance the Playlist to the next clip in your Playlist Controller. You should not use this if you have more than one Playlist Controller. Use the overloaded method instead, it takes a playlistControllerName parameter. More...
 
static void TriggerNextPlaylistClip (string playlistControllerName)
 This method will advance the Playlist to the next clip in the Playlist Controller you name. More...
 
static void TriggerNextClipAllPlaylists ()
 This method will allow you to advance Playlists in all Playlist Controllers to the next clip in their Playlist. More...
 
static void TriggerRandomPlaylistClip ()
 This method will play a random clip in the current Playlist for your Playlist Controller. You should not use this if you have more than one Playlist Controller. Use the overloaded method instead, it takes a playlistControllerName parameter. More...
 
static void TriggerRandomPlaylistClip (string playlistControllerName)
 This method will play a random clip in the current Playlist for the Playlist Controller you name. More...
 
static void TriggerRandomClipAllPlaylists ()
 This method will allow you to play a random clip in all Playlist Controllers using their currenct Playlist More...
 
static void RestartPlaylist ()
 This method will restart the current Playlist in the Playlist Controller. You should not use this if you have more than one Playlist Controller. Use the overloaded method instead, it takes a playlistControllerName parameter. More...
 
static void RestartPlaylist (string playlistControllerName)
 This method will restart a Playlist in the Playlist Controller. More...
 
static void RestartAllPlaylists ()
 This method will allow you to restart all Playlists. More...
 
static void StartPlaylist (string playlistName)
 This method is used to start a Playlist whether it's already loaded and playing or not. More...
 
static void StartPlaylistOnClip (string playlistName, string clipName)
 This method is used to start a Playlist whether it's already loaded and playing or not, on a specific Clip. More...
 
static void StartPlaylist (string playlistControllerName, string playlistName, string clipName=null)
 This method is used to start a Playlist whether it's already loaded and playing or not. More...
 
static void StopLoopingAllCurrentSongs ()
 This method will stop looping the current song on all Playlist Controllers so the next can play when it's finished (if auto-advance is on). More...
 
static void StopLoopingCurrentSong ()
 This method will stop looping the current song so the next can play when it's finished (if auto-advance is on). Use this method when only one Playlist Controller exists. More...
 
static void StopLoopingCurrentSong (string playlistControllerName)
 This method will stop looping the current song so the next can play when it's finished (if auto-advance is on). Use this method when more than one Playlist Controller exists. More...
 
static void StopAllPlaylistsAfterCurrentSongs ()
 This method will stop the Playlist after the current song on all Playlist Controllers. More...
 
static void StopPlaylistAfterCurrentSong ()
 This method will stop the Playlist after the current song. More...
 
static void StopPlaylistAfterCurrentSong (string playlistControllerName)
 This method will stop the Playlist after the current song. Use this method when more than one Playlist Controller exists. More...
 
static void QueuePlaylistClip (string clipName)
 This method will play an Audio Clip by name that's in the current Playlist of your Playlist Controller. You should not use this if you have more than one Playlist Controller. Use the overloaded method instead, it takes a playlistControllerName parameter. This requires auto-advance to work. More...
 
static void QueuePlaylistClip (string playlistControllerName, string clipName)
 This method will play an Audio Clip by name that's in the current Playlist of the Playlist Controller you name, as soon as the currently playing song is over. Loop will be turned off on the current song. This requires auto-advance to work. More...
 
static bool TriggerPlaylistClip (string clipName)
 This method will play an Audio Clip by name that's in the current Playlist of your Playlist Controller. You should not use this if you have more than one Playlist Controller. Use the overloaded method instead, it takes a playlistControllerName parameter. More...
 
static bool TriggerPlaylistClip (string playlistControllerName, string clipName)
 This method will play an Audio Clip by name that's in the current Playlist of the Playlist Controller you name. More...
 
static void ChangePlaylistByName (string playlistName, bool playFirstClip=true)
 This method will change the current Playlist in the Playlist Controller to a Playlist whose name you specify. You should not use this if you have more than one Playlist Controller. Use the overloaded method instead, it takes a playlistControllerName parameter. More...
 
static void ChangePlaylistByName (string playlistControllerName, string playlistName, bool playFirstClip=true)
 This method will play an Audio Clip by name that's in the current Playlist of the Playlist Controller you name. More...
 
static void FadePlaylistToVolume (float targetVolume, float fadeTime)
 This method will fade the volume of the Playlist Controller over X seconds. You should not use this if you have more than one Playlist Controller. Use the overloaded method instead, it takes a playlistControllerName parameter. More...
 
static void FadePlaylistToVolume (string playlistControllerName, float targetVolume, float fadeTime)
 This method will fade the volume of the Playlist Controller whose name you specify over X seconds. More...
 
static void FadeAllPlaylistsToVolume (float targetVolume, float fadeTime)
 This method will allow you to fade all current Playlists used by Playlist Controllers to a target volume over X seconds. More...
 
static void CreatePlaylist (Playlist playlist, bool errorOnDuplicate)
 This method will allow you to add a Playlist via code. More...
 
static void DeletePlaylist (string playlistName)
 This method will allow you to delete a Playlist via code. More...
 
static void AddSongToPlaylist (string playlistName, AudioClip song, bool loopSong=false, float songPitch=1f, float songVolume=1f, string alias=null)
 This method will allow you to add a song to a Playlist by code. More...
 
static void AddSongToPlaylist (string playlistName, MusicSetting newSong)
 This method will allow you to add a song to a Playlist by code. More...
 
static void AudioListenerChanged (AudioListener listener)
 Call this method if you have disabled the Audio Listener and enabled a different one, so Ambient Sounds will continue to work. More...
 
static void FireCustomEventNextFrame (string customEventName, Transform eventOrigin)
 Will fire a Custom Event during the next few frames. This is used by DynamicSoundGroupCreators to fire an event when it's done creating its items, since the listeners in the new Scene won't have been registered yet. More...
 
static void AddCustomEventReceiver (ICustomEventReceiver receiver, Transform receiverTrans)
 This method is used by MasterAudio to keep track of enabled CustomEventReceivers automatically. This is called when then CustomEventReceiver prefab is enabled. More...
 
static void RemoveCustomEventReceiver (ICustomEventReceiver receiver)
 This method is used by MasterAudio to keep track of enabled CustomEventReceivers automatically. This is called when then CustomEventReceiver prefab is disabled. More...
 
static void CreateCustomEvent (string customEventName, CustomEventReceiveMode eventReceiveMode, float distanceThreshold, EventReceiveFilter receiveFilter, int filterModeQty, int?actorInstanceId, string categoryName="", bool isTemporary=false, bool errorOnDuplicate=true)
 This method is used to create a Custom Event at runtime. More...
 
static void DeleteCustomEvent (string customEventName)
 This method is used to delete a temporary Custom Event at runtime. More...
 
static CustomEvent GetCustomEventByName (string customEventName)
 This will find a Custom Event by name. More...
 
static void FireCustomEvent (string customEventName, Transform originObject, bool logDupe=true)
 Calling this method will fire a Custom Event at the originPoint position. All CustomEventReceivers with the named event specified will do whatever action is assigned to them. If there is a distance criteria applied to receivers, it will be applied. More...
 
static bool CustomEventExists (string customEventName)
 Calling this method will return whether or not the specified Custom Event exists. More...
 

Properties

static float PlaylistMasterVolume [get, set]
 This Property can read and set the Playlist Master Volume. More...
 
static bool LogSoundsEnabled [get, set]
 This gets or sets whether Logging is enabled in Master Audio More...
 
static bool LogOutOfVoices [get, set]
 This gets or sets whether Logging Out Of Voices scenarios are enabled in Master Audio More...
 
static bool MixerMuted [get, set]
 This gets or sets whether the entire Mixer is muted or not. More...
 
static bool PlaylistsMuted [get, set]
 This gets or sets whether the all Playlists are muted or not. More...
 
bool EnableMusicDucking [get, set]
 This gets or sets whether music ducking is enabled. More...
 
float MasterCrossFadeTime [get]
 This gets the cross-fade time for Playlists More...
 
static List< Playlist > MusicPlaylists [get]
 This property will return all the Playlists set up in the Master Audio game object. More...
 
static List< GroupBusGroupBuses [get]
 This returns of list of all Buses. More...
 
static List< string > RuntimeSoundGroupNames [get]
 This will get you the list of all Sound Group Names at runtime only. More...
 
static List< string > RuntimeBusNames [get]
 This will get you the list of all Bus Names at runtime only. More...
 
static MasterAudio SafeInstance [get]
 This property returns a reference to the Singleton instance of MasterAudio, but does not log anything to the console. This is used by PersistentAudioSettings script only. More...
 
static MasterAudio Instance [get, set]
 This property returns a reference to the Singleton instance of More...
 
static bool SoundsReady [get]
 This returns true if MasterAudio is initialized and ready to use, false otherwise. More...
 
static bool AppIsShuttingDown [get, set]
 This property is used to prevent bogus Unity errors while the editor is stopping play. You should never need to read or set More...
 
List< string > GroupNames [get]
 This will return a list of all the Sound Group names. More...
 
List< string > BusNames [get]
 This will return a list of all the Bus names, including the selectors for "type in" and "no bus". More...
 
List< string > PlaylistNames [get]
 This will return a list of all the Playlists, including the selectors for "type in" and "no bus". More...
 
List< string > PlaylistNamesOnly [get]
 This will return a list of all the Playlists, not including the selectors for "type in" and "no bus". More...
 
List< string > CustomEventNames [get]
 This will return a list of all the Custom Events you have defined, including the selectors for "type in" and "none". More...
 
List< string > CustomEventNamesOnly [get]
 This will return a list of all the Custom Events you have defined, not including the selectors for "type in" and "none". More...
 
static float MasterVolumeLevel [get, set]
 This is the overall master volume level which can change the relative volume of all buses and Sound Groups - not Playlist Controller songs though, they have their own master volume. More...
 
static SystemLanguage DynamicLanguage [get, set]
 This gets or sets the "Dynamic Language" (needs to be set at runtime based on the user's selection) for use with localized Resource Files. More...
 

Detailed Description

This class contains the heart of the Master Audio API. There are also convenience methods here for Playlist Controllers, even though you can call those methods on the Playlist Controller itself as well.

Member Enumeration Documentation

This setting lets you choose where the Audio Clip lives: Clip, Resource File or Addressable

This controls where the song starts, Beginning, Specific Time or Random Time.

Member Function Documentation

static void DarkTonic.MasterAudio.MasterAudio.AddCustomEventReceiver ( ICustomEventReceiver  receiver,
Transform  receiverTrans 
)
static

This method is used by MasterAudio to keep track of enabled CustomEventReceivers automatically. This is called when then CustomEventReceiver prefab is enabled.

Parameters
receiverThe receiver object interface.
receiverTransThe receiver object Transform.
static void DarkTonic.MasterAudio.MasterAudio.AddSongToPlaylist ( string  playlistName,
AudioClip  song,
bool  loopSong = false,
float  songPitch = 1f,
float  songVolume = 1f,
string  alias = null 
)
static

This method will allow you to add a song to a Playlist by code.

Parameters
playlistNameThe name of the Playlist to add the song to.
songThe Audio clip of the song.
loopSongOptional - whether or not to loop the song.
songPitchOptional - the pitch of the song.
songVolumeOptional - The volume of the song.
aliasOptional - The alias for the song.
static void DarkTonic.MasterAudio.MasterAudio.AddSongToPlaylist ( string  playlistName,
MusicSetting  newSong 
)
static

This method will allow you to add a song to a Playlist by code.

Parameters
playlistNameThe name of the Playlist to add the song to.
newSongThe fully populated MusicSetting object for the song.
static void DarkTonic.MasterAudio.MasterAudio.AddSoundGroupToDuckList ( string  sType,
float  riseVolumeStart,
float  duckedVolCut,
float  unduckTime,
bool  isTemporary = false 
)
static

This method will allow you to add a Sound Group to the list of sounds that cause music in the Playlist to duck.

Parameters
sTypeThe name of the Sound Group.
riseVolumeStartPercentage of time length to start unducking.
duckedVolCutAmount of decimals to cut the original volume
unduckTimeAmount of time to return music to original volume.
isTemporaryUsed by DSGC to create temporary duck groups.
static void DarkTonic.MasterAudio.MasterAudio.AudioListenerChanged ( AudioListener  listener)
static

Call this method if you have disabled the Audio Listener and enabled a different one, so Ambient Sounds will continue to work.

Parameters
listener
static void DarkTonic.MasterAudio.MasterAudio.ChangeBusPitch ( string  busName,
float  pitch 
)
static

This method allows you to change the pitch of all Variations in all Groups in a bus.

Parameters
busNameThe name of the bus.
pitchThe new pitch to use.
static void DarkTonic.MasterAudio.MasterAudio.ChangePlaylistByName ( string  playlistName,
bool  playFirstClip = true 
)
static

This method will change the current Playlist in the Playlist Controller to a Playlist whose name you specify. You should not use this if you have more than one Playlist Controller. Use the overloaded method instead, it takes a playlistControllerName parameter.

Parameters
playlistNameThe name of the new Playlist.
playFirstClipOptional - defaults to True. If you specify false, the first clip in the Playlist will not automatically play.
static void DarkTonic.MasterAudio.MasterAudio.ChangePlaylistByName ( string  playlistControllerName,
string  playlistName,
bool  playFirstClip = true 
)
static

This method will play an Audio Clip by name that's in the current Playlist of the Playlist Controller you name.

Parameters
playlistControllerNameThe Playlist Controller name
playlistNameThe name of the new Playlist.
playFirstClipOptional - defaults to True. If you specify false, the first clip in the Playlist will not automatically play.
static void DarkTonic.MasterAudio.MasterAudio.ChangePlaylistPitch ( string  playlistName,
float  pitch,
string  songName = null 
)
static

This method will change the pitch of all clips in a Playlist, or a single song if you specify the song name.

Parameters
playlistNameThe name of the Playlist.
pitchThe pitch to change the songs to.
songName(Optional) the song name to change the pitch of. If not specified, all songs will be changed.
static void DarkTonic.MasterAudio.MasterAudio.ChangeVariationClip ( string  sType,
bool  changeAllVariations,
string  variationName,
AudioClip  clip 
)
static

This method will change the Audio Clip used by a variation into one you specify.

Parameters
sTypeThe name of the Sound Group.
changeAllVariationsWhether to change all variations in the Sound Group or just one.
variationNameUse this to specify a certain variation's name. Only that variation will be changes if you haven't passed changeAllVariations as true.
clipThe Audio Clip to replace the old one with.
static void DarkTonic.MasterAudio.MasterAudio.ChangeVariationClipFromResources ( string  sType,
bool  changeAllVariations,
string  variationName,
string  resourceFileName 
)
static

This method will change the Audio Clip used by a variation into one named from a Resource file.

Parameters
sTypeThe name of the Sound Group.
changeAllVariationsWhether to change all variations in the Sound Group or just one.
variationNameUse this to specify a certain variation's name. Only that variation will be changes if you haven't passed changeAllVariations as true.
resourceFileNameThe name of the file in the Resource.
static void DarkTonic.MasterAudio.MasterAudio.ChangeVariationPitch ( string  sType,
bool  changeAllVariations,
string  variationName,
float  pitch 
)
static

This method will change the pitch of a variation or all variations in a Sound Group.

Parameters
sTypeThe name of the Sound Group.
changeAllVariationsWhether to change all variations in the Sound Group or just one.
variationNameUse this to specify a certain variation's name. Only that variation will be changes if you haven't passed changeAllVariations as true.
pitchThe new pitch of the variation.
static void DarkTonic.MasterAudio.MasterAudio.ChangeVariationVolume ( string  sType,
bool  changeAllVariations,
string  variationName,
float  volume 
)
static

This method will change the volume of a variation or all variations in a Sound Group.

Parameters
sTypeThe name of the Sound Group.
changeAllVariationsWhether to change all variations in the Sound Group or just one.
variationNameUse this to specify a certain variation's name. Only that variation will be changes if you haven't passed changeAllVariations as true.
volumeThe new volume of the variation.
static bool DarkTonic.MasterAudio.MasterAudio.CreateBus ( string  busName,
int?  actorInstanceId,
bool  errorOnExisting = true,
bool  isTemporary = false 
)
static

This method will create a new bus with the name you specify.

Parameters
busNameThe name of the new bus.
actorInstanceIdThe actor instanceId of the creator. Used the track if another Dynamic Sound Group Creator is still active with the bus so we don't delete it yet.
errorOnExistingWhether to log an error if the bus already exists (same name).
isTemporaryUsed by DGSC to create temporary buses.
static void DarkTonic.MasterAudio.MasterAudio.CreateCustomEvent ( string  customEventName,
CustomEventReceiveMode  eventReceiveMode,
float  distanceThreshold,
EventReceiveFilter  receiveFilter,
int  filterModeQty,
int?  actorInstanceId,
string  categoryName = "",
bool  isTemporary = false,
bool  errorOnDuplicate = true 
)
static

This method is used to create a Custom Event at runtime.

Parameters
customEventNameThe name of the custom event.
eventReceiveModeThe receive mode of the event.
distanceThresholdThe min or max distance to transmit the event to (optional).
receiveFilterType to filter by (optional).
filterModeQtyThe number to limit the filter by (optional).
categoryNameThe category of the custom event.
actorInstanceIdThe actor instanceId of the creator. Used the track if another Dynamic Sound Group Creator is still active with the bus so we don't delete it yet.
isTemporaryWhether the category of the custom event is temporary or not.
errorOnDuplicateWhether or not to log an error if the event already exists.
static void DarkTonic.MasterAudio.MasterAudio.CreateGroupVariationFromClip ( string  sType,
AudioClip  clip,
string  variationName,
float  volume = 1f,
float  pitch = 1f 
)
static

This method will add the variation to a Sound Group during runtime.

Parameters
sTypeThe name of the Sound Group.
clipThe Audio Clip of the variation.
variationNameUse this to specify a the variation's name.
volumeUse this to specify a the variation's volume.
pitchUse this to specify a the variation's pitch.
static void DarkTonic.MasterAudio.MasterAudio.CreatePlaylist ( Playlist  playlist,
bool  errorOnDuplicate 
)
static

This method will allow you to add a Playlist via code.

Parameters
playlistThe playlist with all settings included
errorOnDuplicateWhether or not to log an error if the Playlist already exists (same name).
static Transform DarkTonic.MasterAudio.MasterAudio.CreateSoundGroup ( DynamicSoundGroup  aGroup,
int?  creatorInstanceId,
bool  errorOnExisting = true 
)
static

This method will create a new Sound Group from the Audio Clips you pass in.

Parameters
aGroupThe object containing all variations and group info.
creatorInstanceIdThe InstanceId of the Game Object creating the Sound Group.
errorOnExistingWhether to log an error if the Group already exists (same name).
Returns
Whether or not the Sound Group was created.
static bool DarkTonic.MasterAudio.MasterAudio.CustomEventExists ( string  customEventName)
static

Calling this method will return whether or not the specified Custom Event exists.

Parameters
customEventNameThe name of the custom event.
static void DarkTonic.MasterAudio.MasterAudio.DeleteBusByName ( string  busName)
static

This method will delete a bus by name.

Parameters
busNameThe name of the bus to delete.
static void DarkTonic.MasterAudio.MasterAudio.DeleteCustomEvent ( string  customEventName)
static

This method is used to delete a temporary Custom Event at runtime.

Parameters
customEventNameThe name of the custom event.
static void DarkTonic.MasterAudio.MasterAudio.DeleteGroupVariation ( string  sType,
string  variationName 
)
static

This method will delete a variation from a Sound Group during runtime.

Parameters
sType
variationName
static void DarkTonic.MasterAudio.MasterAudio.DeletePlaylist ( string  playlistName)
static

This method will allow you to delete a Playlist via code.

Parameters
playlistNameThe playlist name
static void DarkTonic.MasterAudio.MasterAudio.DeleteSoundGroup ( string  sType)
static

This method will delete a Sound Group, and all variations from the current Scene's Master Audio object.

Parameters
sTypeThe name of the Sound Group.
static void DarkTonic.MasterAudio.MasterAudio.FadeAllPlaylistsToVolume ( float  targetVolume,
float  fadeTime 
)
static

This method will allow you to fade all current Playlists used by Playlist Controllers to a target volume over X seconds.

static void DarkTonic.MasterAudio.MasterAudio.FadeBusToVolume ( string  busName,
float  newVolume,
float  fadeTime,
System.Action  completionCallback = null,
bool  willStopAfterFade = false,
bool  willResetVolumeAfterFade = false 
)
static

This method allows you to fade the volume of a bus over X seconds.

Parameters
busNameThe name of the bus to fade.
newVolumeThe target volume of the bus.
fadeTimeThe amount of time the fade will take.
completionCallback(Optional) - a method to execute when the fade has completed.
willStopAfterFade(Optional) - specify true here if you want the bus to stop after the fade is complete.
willResetVolumeAfterFade(Optional) - specify true here if you want the bus volume to be restored to its pre-fade volume after the fade is complete. This has no effect on a fade of less than .1 second.
static void DarkTonic.MasterAudio.MasterAudio.FadeOutAllOfSound ( string  sType,
float  fadeTime 
)
static

This method allows you to fade out all sounds in a specified Sound Group for X seconds. This uses each Variation's fade command. If you want to Fade a Sound Group with the Group volume, use FadeSoundGroupToVolume

Parameters
sTypeThe name of the Sound Group.
fadeTimeThe amount of seconds the fading will take.
static void DarkTonic.MasterAudio.MasterAudio.FadeOutAllSoundsOfTransform ( Transform  sourceTrans,
float  fadeTime 
)
static

This method allows you to fade out all sounds triggered by or following a Transform for X seconds.

Parameters
sourceTransThe Transform the sound was triggered to follow or use the position of.
fadeTimeThe amount of seconds the fading will take.
static void DarkTonic.MasterAudio.MasterAudio.FadeOutOldBusVoices ( string  busName,
float  minimumPlayTime,
float  fadeTime 
)
static

This method allows you to fade out voices on a Bus that have been playing for at least X seconds.

Parameters
busNameThe name of the bus to fade.
minimumPlayTimeThe minimum time that each Variation must have been playing to be faded.
fadeTimeThe duration of the fade to perform.
static void DarkTonic.MasterAudio.MasterAudio.FadeOutOldSoundGroupVoices ( string  sType,
float  minimumPlayTime,
float  fadeTime 
)
static

This method allows you to fade out voices on a Sound Group that have been playing for at least X seconds.

Parameters
sTypeThe name of the Sound Group to fade.
minimumPlayTimeThe minimum time that each Variation must have been playing to be faded.
fadeTimeThe duration of the fade to perform.
static void DarkTonic.MasterAudio.MasterAudio.FadeOutSoundGroupOfTransform ( Transform  sourceTrans,
string  sType,
float  fadeTime 
)
static

This method allows you to fade out all sounds of a particular Sound Group triggered by or following a Transform for X seconds.

Parameters
sourceTransThe Transform the sound was triggered to follow or use the position of.
sTypeThe name of the Sound Group.
fadeTimeThe amount of seconds the fading will take.
static void DarkTonic.MasterAudio.MasterAudio.FadePlaylistToVolume ( float  targetVolume,
float  fadeTime 
)
static

This method will fade the volume of the Playlist Controller over X seconds. You should not use this if you have more than one Playlist Controller. Use the overloaded method instead, it takes a playlistControllerName parameter.

Parameters
targetVolumeThe target volume of the Playlist.
fadeTimeThe time to fade completely to the target volume.
static void DarkTonic.MasterAudio.MasterAudio.FadePlaylistToVolume ( string  playlistControllerName,
float  targetVolume,
float  fadeTime 
)
static

This method will fade the volume of the Playlist Controller whose name you specify over X seconds.

Parameters
playlistControllerNameThe name of the Playlist Controller.
targetVolumeThe target volume of the Playlist.
fadeTimeThe time to fade completely to the target volume.
static void DarkTonic.MasterAudio.MasterAudio.FadeSoundGroupToVolume ( string  sType,
float  newVolume,
float  fadeTime,
System.Action  completionCallback = null,
bool  willStopAfterFade = false,
bool  willResetVolumeAfterFade = false 
)
static

This method allows you to fade the volume of a Sound Group over X seconds.

Parameters
sTypeThe name of the Sound Group to fade.
newVolumeThe target volume of the Sound Group.
fadeTimeThe amount of time the fade will take.
completionCallback(Optional) - a method to execute when the fade has completed.
willStopAfterFade(Optional) - specify true here if you want the Sound Group to stop after the fade is complete.
willResetVolumeAfterFade(Optional) - specify true here if you want the Sound Group's volume to be restored to its pre-fade volume after the fade is complete. This has no effect on a fade of less than .1 second.
static void DarkTonic.MasterAudio.MasterAudio.FireCustomEvent ( string  customEventName,
Transform  originObject,
bool  logDupe = true 
)
static

Calling this method will fire a Custom Event at the originPoint position. All CustomEventReceivers with the named event specified will do whatever action is assigned to them. If there is a distance criteria applied to receivers, it will be applied.

Parameters
customEventNameThe name of the custom event.
originObjectThe Transform origin of the event.
logDupeWhether or not to log an error with duplicate event firing.
static void DarkTonic.MasterAudio.MasterAudio.FireCustomEventNextFrame ( string  customEventName,
Transform  eventOrigin 
)
static

Will fire a Custom Event during the next few frames. This is used by DynamicSoundGroupCreators to fire an event when it's done creating its items, since the listeners in the new Scene won't have been registered yet.

Parameters
customEventName
eventOrigin
static List<SoundGroupVariation> DarkTonic.MasterAudio.MasterAudio.GetAllPlayingVariations ( )
static

Returns a list of all Variation scripts that are currently playing a sound.

Returns
List of SoundGroupVariation
static List<SoundGroupVariation> DarkTonic.MasterAudio.MasterAudio.GetAllPlayingVariationsInBus ( string  busName)
static

Returns a list of all Variation scripts that are currently playing through a bus.

Parameters
busNameThe name of the bus to query.
Returns
List of SoundGroupVariation
static List<SoundGroupVariation> DarkTonic.MasterAudio.MasterAudio.GetAllPlayingVariationsOfTransform ( Transform  sourceTrans)
static

This will return a list of all playing Variations of a Transform

Parameters
sourceTransSource transform
Returns
List of SoundGroupVariation
static List<SoundGroupVariation> DarkTonic.MasterAudio.MasterAudio.GetAllPlayingVariationsOfTransformList ( List< Transform >  sourceTransList)
static

This will return a list of all playing Variations of a list of Transforms

Parameters
sourceTransListSource transform list
Returns
List of SoundGroupVariation
static float DarkTonic.MasterAudio.MasterAudio.GetBusVolume ( MasterAudioGroup  maGroup)
static

This method will return the bus volume of a specified Sound Group, if any. If the Group is not in a bus, this will return 1.

Parameters
maGroupThe Sound Group object.
Returns
The volume of the bus.
static CustomEvent DarkTonic.MasterAudio.MasterAudio.GetCustomEventByName ( string  customEventName)
static

This will find a Custom Event by name.

Parameters
customEventName
Returns
static AudioGroupInfo DarkTonic.MasterAudio.MasterAudio.GetGroupInfo ( string  sType)
static

This method will return the Audio Group Info settings for examination purposes. Use on during play in editor, not during edit.

Parameters
sTypeThe name of the Sound Group
Returns
an Audio Group Info object
static float DarkTonic.MasterAudio.MasterAudio.GetGroupVolume ( string  sType)
static

This will return the volume of a Sound Group.

Parameters
sTypeThe name of the Sound Group
Returns
The volume of the Sound Group
static AudioSource DarkTonic.MasterAudio.MasterAudio.GetNextVariationForSoundGroup ( string  sType)
static

This returns the AudioSource for the next Variation to be played. Only works for top-to-bottom Variation Sequence.

Parameters
sType
Returns
Audio Source
static float DarkTonic.MasterAudio.MasterAudio.GetVariationLength ( string  sType,
string  variationName 
)
static

This method will return the length in seconds of a Variation in a Sound Group.

Parameters
sTypeThe name of the Sound Group.
variationNameUse this to specify a certain variation's name. The first match will be used
Returns
The time length of the Variation, taking pitch into account. If it cannot find the Variation, it returns -1 and logs the reason to the console.
static void DarkTonic.MasterAudio.MasterAudio.GlideBusByPitch ( string  busName,
float  pitchAddition,
float  glideTime,
System.Action  completionCallback = null 
)
static

This method allows you to glide the pitch of each playing Variation on each Sound Group assigned to a Bus over X seconds.

Parameters
busNameThe name of the bus to fade.
pitchAdditionThe amount of pitch to add to each playing Variation on each Sound Group assigned to the Bus.
glideTimeThe amount of time the pitch glide will take.
completionCallback(Optional) - a method to execute when the glide has completed.
static void DarkTonic.MasterAudio.MasterAudio.GlideSoundGroupByPitch ( string  sType,
float  pitchAddition,
float  glideTime,
System.Action  completionCallback = null 
)
static

This method allows you to glide the pitch of each Variation of a Sound Group over X seconds by a specified amount.

Parameters
sTypeThe name of the Sound Group to glide pitch.
pitchAdditionThe amount of pitch to add to each Variation's pitch in the Sound Group.
glideTimeThe amount of time the pitch glide will take.
completionCallback(Optional) - a method to execute when the pitch glide has completed.
static GroupBus DarkTonic.MasterAudio.MasterAudio.GrabBusByName ( string  busName)
static

This method will return the settings of a bus.

Parameters
busNameThe bus name.
Returns
GroupBus object
static MasterAudioGroup DarkTonic.MasterAudio.MasterAudio.GrabGroup ( string  sType,
bool  logIfMissing = true 
)
static

This method will return the Sound Group settings for examination purposes.

Parameters
sTypeThe name of the Sound Group
logIfMissingWhether to log to the Console if Group cannot be found.
Returns
A MasterAudioGroup object
static Playlist DarkTonic.MasterAudio.MasterAudio.GrabPlaylist ( string  playlistName,
bool  logErrorIfNotFound = true 
)
static

This method will find a Playlist by name and return it to you.

static void DarkTonic.MasterAudio.MasterAudio.GradualOcclusionFreqChange ( SoundGroupVariation  variation,
float  fadeTime,
float  newCutoffFreq 
)
static

This method will gradually change the cutoff frequency of an occluded Variation

static bool DarkTonic.MasterAudio.MasterAudio.IsSoundGroupPlaying ( string  sType)
static

Returns true or false, telling you true if a Sound Group is playing any voices.

Returns
true or false
static bool DarkTonic.MasterAudio.MasterAudio.IsTransformPlayingSoundGroup ( string  sType,
Transform  sourceTrans 
)
static

Will return whether the Sound Group you specify is played by a Transform you pass in.

Parameters
sTypeSound Group name
sourceTransThe Transform in question
Returns
boolean
static List<string> DarkTonic.MasterAudio.MasterAudio.ListOfAudioClipsInGroupsEditTime ( )
static

This provides a list of of all audio clip names used in all Sound Groups, at edit time.

Returns
static void DarkTonic.MasterAudio.MasterAudio.MuteAllPlaylists ( )
static

This method will allow you to mute all Playlist Controllers.

static void DarkTonic.MasterAudio.MasterAudio.MuteBus ( string  busName)
static

This method allows you to mute all Groups in a bus.

Parameters
busNameThe name of the bus to mute.
static void DarkTonic.MasterAudio.MasterAudio.MuteEverything ( )
static

This method allows you to mute all Audio Sources in the mixer and Playlists as well.

static void DarkTonic.MasterAudio.MasterAudio.MuteGroup ( string  sType,
bool  shouldCheckMuteStatus = true 
)
static

This method will mute all variations in a Sound Group.

Parameters
sTypeThe name of the Sound Group
shouldCheckMuteStatusWhether or not we should immediately go and silence other non-soloed Groups after soloing this one.
static void DarkTonic.MasterAudio.MasterAudio.MutePlaylist ( )
static

This method will allow you to mute your Playlist Controller. You should not use this if you have more than one Playlist Controller. Use the overloaded method instead, it takes a playlistControllerName parameter.

static void DarkTonic.MasterAudio.MasterAudio.MutePlaylist ( string  playlistControllerName)
static

This method will allow you to mute a Playlist Controller by name.

Parameters
playlistControllerNameThe name of the Playlist Controller.
static void DarkTonic.MasterAudio.MasterAudio.PauseAllPlaylists ( )
static

This method will allow you to pause all Playlist Controllers.

static void DarkTonic.MasterAudio.MasterAudio.PauseAllSoundsOfTransform ( Transform  sourceTrans)
static

This method allows you to pause all sounds triggered by or following a Transform.

Parameters
sourceTransThe Transform the sound was triggered to follow or use the position of.
static void DarkTonic.MasterAudio.MasterAudio.PauseBus ( string  busName)
static

This method allows you to pause all Audio Sources in a bus.

Parameters
busNameThe name of the bus to pause.
static void DarkTonic.MasterAudio.MasterAudio.PauseBusOfTransform ( Transform  sourceTrans,
string  busName 
)
static

This method allows you to pause all sounds of a particular Bus triggered by or following a Transform

Parameters
sourceTransThe Transform the sound was triggered to follow or use the position of.
busNameThe name of the Bus.
static void DarkTonic.MasterAudio.MasterAudio.PauseEverything ( )
static

This method allows you to pause all Audio Sources in the mixer and Playlists as well.

static void DarkTonic.MasterAudio.MasterAudio.PauseMixer ( )
static

This method allows you to pause all Audio Sources in the mixer (everything but Playlists).

static void DarkTonic.MasterAudio.MasterAudio.PausePlaylist ( )
static

This method will allow you to pause your Playlist Controller. You should not use this if you have more than one Playlist Controller. Use the overloaded method instead, it takes a playlistControllerName parameter.

static void DarkTonic.MasterAudio.MasterAudio.PausePlaylist ( string  playlistControllerName)
static

This method will allow you to pause a Playlist Controller by name.

Parameters
playlistControllerNameThe name of the Playlist Controller.
static void DarkTonic.MasterAudio.MasterAudio.PauseSoundGroup ( string  sType)
static

This method allows you to pause all Audio Sources in a Sound Group.

Parameters
sTypeThe name of the Sound Group to pause.
static void DarkTonic.MasterAudio.MasterAudio.PauseSoundGroupOfTransform ( Transform  sourceTrans,
string  sType 
)
static

This method allows you to pause all sounds of a particular Sound Group triggered by or following a Transform.

Parameters
sourceTransThe Transform the sound was triggered to follow or use the position of.
sTypeThe name of the Sound Group to stop.
static void DarkTonic.MasterAudio.MasterAudio.PerformDelayedAmbientTriggers ( )
static

Will trigger an Ambient Sound a frame later than it is enabled. This is to avoid it happening when not intended such as when placed on an object that is Instantiated disabled for pooling.

static PlaySoundResult DarkTonic.MasterAudio.MasterAudio.PlaySound ( string  sType,
float  volumePercentage = 1f,
float?  pitch = null,
float  delaySoundTime = 0f,
string  variationName = null,
double?  timeToSchedulePlay = null,
bool  isChaining = false,
bool  isSingleSubscribedPlay = false 
)
static

This method allows you to play a sound in a Sound Group in the location of the Master Audio prefab. Returns a PlaySoundResult object.

Parameters
sTypeThe name of the Sound Group to trigger a sound from.
volumePercentageOptional - used if you want to play the sound at a reduced volume (between 0 and 1).
pitchOptional - used if you want to play the sound at a specific pitch. If you do, it will override the pich and random pitch in the variation.
delaySoundTimeOptional - used if you want to play the sound X seconds from now instead of immediately.
variationNameOptional - used if you want to play a specific variation (or Clip id) by name. Otherwise a random variation is played.
timeToSchedulePlayOptional - used to pass in the DSP time to play the sound. Normally do not use this, use the delaySoundTime param instead.
isChainingDon't ever specify this - used to control number of loops for Chained Loop Groups. MasterAudio will pass this parameter when it needs it. Never specify this param.
isSingleSubscribedPlayDon't ever specify this - MasterAudio will pass this parameter when it needs it. Never specify this param.
Returns
PlaySoundResult - this object can be used to read if the sound played or not and also gives access to the Variation object that was used.
static PlaySoundResult DarkTonic.MasterAudio.MasterAudio.PlaySound3DAtTransform ( string  sType,
Transform  sourceTrans,
float  volumePercentage = 1f,
float?  pitch = null,
float  delaySoundTime = 0f,
string  variationName = null,
double?  timeToSchedulePlay = null,
bool  isChaining = false,
bool  isSingleSubscribedPlay = false 
)
static

This method allows you to play a sound in a Sound Group from a specific position - the position of a Transform you pass in.

Parameters
sTypeThe name of the Sound Group to trigger a sound from.
sourceTransThe Transform whose position you want the sound to eminate from.
volumePercentageOptional - used if you want to play the sound at a reduced volume (between 0 and 1).
pitchOptional - used if you want to play the sound at a specific pitch. If you do, it will override the pich and random pitch in the variation.
delaySoundTimeOptional - used if you want to play the sound X seconds from now instead of immediately.
variationNameOptional - used if you want to play a specific variation (or Clip id) by name. Otherwise a random variation is played.
timeToSchedulePlayOptional - used to pass in the DSP time to play the sound. Normally do not use this, use the delaySoundTime param instead.
isChainingDon't ever specify this - used to control number of loops for Chained Loop Groups. MasterAudio will pass this parameter when it needs it. Never specify this param.
isSingleSubscribedPlayDon't ever specify this - MasterAudio will pass this parameter when it needs it. Never specify this param.
Returns
PlaySoundResult - this object can be used to read if the sound played or not and also gives access to the Variation object that was used.
static bool DarkTonic.MasterAudio.MasterAudio.PlaySound3DAtTransformAndForget ( string  sType,
Transform  sourceTrans,
float  volumePercentage = 1f,
float?  pitch = null,
float  delaySoundTime = 0f,
string  variationName = null,
double?  timeToSchedulePlay = null 
)
static

This method allows you to play a sound in a Sound Group from a specific position - the position of a Transform you pass in. Returns bool indicating success (played) or not.

Parameters
sTypeThe name of the Sound Group to trigger a sound from.
sourceTransThe Transform whose position you want the sound to eminate from.
volumePercentageOptional - used if you want to play the sound at a reduced volume (between 0 and 1).
pitchOptional - used if you want to play the sound at a specific pitch. If you do, it will override the pich and random pitch in the variation.
delaySoundTimeOptional - used if you want to play the sound X seconds from now instead of immediately.
variationNameOptional - used if you want to play a specific variation (or Clip id) by name. Otherwise a random variation is played.
timeToSchedulePlayOptional - used to pass in the DSP time to play the sound. Normally do not use this, use the delaySoundTime param instead.
Returns
boolean- true indicating that the sound was either played or scheduled, false otherwise.
static IEnumerator DarkTonic.MasterAudio.MasterAudio.PlaySound3DAtTransformAndWaitUntilFinished ( string  sType,
Transform  sourceTrans,
float  volumePercentage = 1f,
float?  pitch = null,
float  delaySoundTime = 0f,
string  variationName = null,
double?  timeToSchedulePlay = null,
System.Action  completedAction = null 
)
static

This method allows you to play a sound in a Sound Group from a specific position - a Transform you pass in. This method will not return until the sound is finished (or cannot play) to continue execution. You need to call this with StartCoroutine. The sound will not be played looped, since that could cause a Coroutine that would never end.

Parameters
sTypeThe name of the Sound Group to trigger a sound from.
sourceTransThe Transform whose position you want the sound to eminate from. Pass null if you want to play the sound 2D.
volumePercentageOptional - used if you want to play the sound at a reduced volume (between 0 and 1).
pitchOptional - used if you want to play the sound at a specific pitch. If you do, it will override the pich and random pitch in the variation.
delaySoundTimeOptional - used if you want to play the sound X seconds from now instead of immediately.
variationNameOptional - used if you want to play a specific variation (or Clip id) by name. Otherwise a random variation is played.
timeToSchedulePlayOptional - used to pass in the DSP time to play the sound. Normally do not use this, use the delaySoundTime param instead.
completedActionOptional - Code to execute when the sound is finished.
static PlaySoundResult DarkTonic.MasterAudio.MasterAudio.PlaySound3DAtVector3 ( string  sType,
Vector3  sourcePosition,
float  volumePercentage = 1f,
float?  pitch = null,
float  delaySoundTime = 0f,
string  variationName = null,
double?  timeToSchedulePlay = null 
)
static

This method allows you to play a sound in a Sound Group from a specific Vector3 position. Returns a PlaySoundResult object.

Parameters
sTypeThe name of the Sound Group to trigger a sound from.
sourcePositionThe position you want the sound to eminate from. Required.
volumePercentageOptional - used if you want to play the sound at a reduced volume (between 0 and 1).
pitchOptional - used if you want to play the sound at a specific pitch. If you do, it will override the pich and random pitch in the variation.
delaySoundTimeOptional - used if you want to play the sound X seconds from now instead of immediately.
variationNameOptional - used if you want to play a specific variation (or Clip id) by name. Otherwise a random variation is played.
timeToSchedulePlayOptional - used to pass in the DSP time to play the sound. Normally do not use this, use the delaySoundTime param instead.
Returns
PlaySoundResult - this object can be used to read if the sound played or not and also gives access to the Variation object that was used.
static bool DarkTonic.MasterAudio.MasterAudio.PlaySound3DAtVector3AndForget ( string  sType,
Vector3  sourcePosition,
float  volumePercentage = 1f,
float?  pitch = null,
float  delaySoundTime = 0f,
string  variationName = null,
double?  timeToSchedulePlay = null 
)
static

This method allows you to play a sound in a Sound Group from a specific Vector 3 position. Returns bool indicating success (played) or not.

Parameters
sTypeThe name of the Sound Group to trigger a sound from.
sourcePositionThe position you want the sound to eminate from. Required.
volumePercentageOptional - used if you want to play the sound at a reduced volume (between 0 and 1).
pitchOptional - used if you want to play the sound at a specific pitch. If you do, it will override the pich and random pitch in the variation.
delaySoundTimeOptional - used if you want to play the sound X seconds from now instead of immediately.
variationNameOptional - used if you want to play a specific variation (or Clip id) by name. Otherwise a random variation is played.
timeToSchedulePlayOptional - used to pass in the DSP time to play the sound. Normally do not use this, use the delaySoundTime param instead.
Returns
boolean- true indicating that the sound was either played or scheduled, false otherwise.
static PlaySoundResult DarkTonic.MasterAudio.MasterAudio.PlaySound3DFollowTransform ( string  sType,
Transform  sourceTrans,
float  volumePercentage = 1f,
float?  pitch = null,
float  delaySoundTime = 0f,
string  variationName = null,
double?  timeToSchedulePlay = null,
bool  isChaining = false,
bool  isSingleSubscribedPlay = false 
)
static

This method allows you to play a sound in a Sound Group from a specific position - a Transform you pass in, and it will follow the Transform if it moves. Returns a PlaySoundResult.

Parameters
sTypeThe name of the Sound Group to trigger a sound from.
sourceTransThe Transform whose position you want the sound to eminate from.
volumePercentageOptional - used if you want to play the sound at a reduced volume (between 0 and 1).
pitchOptional - used if you want to play the sound at a specific pitch. If you do, it will override the pich and random pitch in the variation.
delaySoundTimeOptional - used if you want to play the sound X seconds from now instead of immediately.
variationNameOptional - used if you want to play a specific variation (or Clip id) by name. Otherwise a random variation is played.
timeToSchedulePlayOptional - used to pass in the DSP time to play the sound. Normally do not use this, use the delaySoundTime param instead.
isChainingDon't ever specify this - used to control number of loops for Chained Loop Groups. MasterAudio will pass this parameter when it needs it. Never specify this param.
isSingleSubscribedPlayDon't ever specify this - MasterAudio will pass this parameter when it needs it. Never specify this param.
Returns
PlaySoundResult - this object can be used to read if the sound played or not and also gives access to the Variation object that was used.
static bool DarkTonic.MasterAudio.MasterAudio.PlaySound3DFollowTransformAndForget ( string  sType,
Transform  sourceTrans,
float  volumePercentage = 1f,
float?  pitch = null,
float  delaySoundTime = 0f,
string  variationName = null,
double?  timeToSchedulePlay = null 
)
static

This method allows you to play a sound in a Sound Group from a specific position - a Transform you pass in. Returns bool indicating success (played) or not.

Parameters
sTypeThe name of the Sound Group to trigger a sound from.
sourceTransThe Transform whose position you want the sound to eminate from.
volumePercentageOptional - used if you want to play the sound at a reduced volume (between 0 and 1).
pitchOptional - used if you want to play the sound at a specific pitch. If you do, it will override the pich and random pitch in the variation.
delaySoundTimeOptional - used if you want to play the sound X seconds from now instead of immediately.
variationNameOptional - used if you want to play a specific variation (or Clip id) by name. Otherwise a random variation is played.
timeToSchedulePlayOptional - used to pass in the DSP time to play the sound. Normally do not use this, use the delaySoundTime param instead.
Returns
boolean- true indicating that the sound was either played or scheduled, false otherwise.
static IEnumerator DarkTonic.MasterAudio.MasterAudio.PlaySound3DFollowTransformAndWaitUntilFinished ( string  sType,
Transform  sourceTrans,
float  volumePercentage = 1f,
float?  pitch = null,
float  delaySoundTime = 0f,
string  variationName = null,
double?  timeToSchedulePlay = null,
System.Action  completedAction = null 
)
static

This method allows you to play a sound in a Sound Group from a specific position - a Transform you pass in, and it will follow the Transform if it moves. This method will not return until the sound is finished (or cannot play) to continue execution. You need to call this with StartCoroutine. The sound will not be played looped, since that could cause a Coroutine that would never end.

Parameters
sTypeThe name of the Sound Group to trigger a sound from.
sourceTransThe Transform whose position you want the sound to eminate from. Pass null if you want to play the sound 2D.
volumePercentageOptional - used if you want to play the sound at a reduced volume (between 0 and 1).
pitchOptional - used if you want to play the sound at a specific pitch. If you do, it will override the pich and random pitch in the variation.
delaySoundTimeOptional - used if you want to play the sound X seconds from now instead of immediately.
variationNameOptional - used if you want to play a specific variation (or Clip id) by name. Otherwise a random variation is played.
timeToSchedulePlayOptional - used to pass in the DSP time to play the sound. Normally do not use this, use the delaySoundTime param instead.
completedActionOptional - Code to execute when the sound is finished.
static bool DarkTonic.MasterAudio.MasterAudio.PlaySoundAndForget ( string  sType,
float  volumePercentage = 1f,
float?  pitch = null,
float  delaySoundTime = 0f,
string  variationName = null,
double?  timeToSchedulePlay = null 
)
static

This method allows you to play a sound in a Sound Group in the location of the Master Audio prefab. Returns bool indicating success (played) or not.

Parameters
sTypeThe name of the Sound Group to trigger a sound from.
volumePercentageOptional - used if you want to play the sound at a reduced volume (between 0 and 1).
pitchOptional - used if you want to play the sound at a specific pitch. If you do, it will override the pich and random pitch in the variation.
delaySoundTimeOptional - used if you want to play the sound X seconds from now instead of immediately.
variationNameOptional - used if you want to play a specific variation (or Clip id) by name. Otherwise a random variation is played.
timeToSchedulePlayOptional - used to pass in the DSP time to play the sound. Normally do not use this, use the delaySoundTime param instead.
Returns
boolean- true indicating that the sound was either played or scheduled, false otherwise.
static IEnumerator DarkTonic.MasterAudio.MasterAudio.PlaySoundAndWaitUntilFinished ( string  sType,
float  volumePercentage = 1f,
float?  pitch = null,
float  delaySoundTime = 0f,
string  variationName = null,
System.Action  completedAction = null 
)
static

This method allows you to play a sound in a Sound Group from the location of Master Audio. This method will not return until the sound is finished (or cannot play) to continue execution. You need to call this with StartCoroutine. The sound will not be played looped, since that could cause a Coroutine that would never end.

Parameters
sTypeThe name of the Sound Group to trigger a sound from.
volumePercentageOptional - used if you want to play the sound at a reduced volume (between 0 and 1).
pitchOptional - used if you want to play the sound at a specific pitch. If you do, it will override the pich and random pitch in the variation.
delaySoundTimeOptional - used if you want to play the sound X seconds from now instead of immediately.
variationNameOptional - used if you want to play a specific variation (or Clip id) by name. Otherwise a random variation is played.
completedActionOptional - Code to execute when the sound is finished.
static void DarkTonic.MasterAudio.MasterAudio.QueuePlaylistClip ( string  clipName)
static

This method will play an Audio Clip by name that's in the current Playlist of your Playlist Controller. You should not use this if you have more than one Playlist Controller. Use the overloaded method instead, it takes a playlistControllerName parameter. This requires auto-advance to work.

Parameters
clipNameThe name of the clip.
static void DarkTonic.MasterAudio.MasterAudio.QueuePlaylistClip ( string  playlistControllerName,
string  clipName 
)
static

This method will play an Audio Clip by name that's in the current Playlist of the Playlist Controller you name, as soon as the currently playing song is over. Loop will be turned off on the current song. This requires auto-advance to work.

Parameters
clipNameThe name of the clip.
playlistControllerNameThe name of the Playlist Controller.
static void DarkTonic.MasterAudio.MasterAudio.RefillSoundGroupPool ( string  sType)
static

This method allows you to refill the pool of the Variation sounds for a Sound Group. That way you don't have to wait for all remaining random (or top to bottom) sounds to be played before it refills.

Parameters
sTypeThe name of the Sound Group to refill the pool of.
static void DarkTonic.MasterAudio.MasterAudio.RemoveCustomEventReceiver ( ICustomEventReceiver  receiver)
static

This method is used by MasterAudio to keep track of enabled CustomEventReceivers automatically. This is called when then CustomEventReceiver prefab is disabled.

Parameters
receiverThe receiver object interface.
static void DarkTonic.MasterAudio.MasterAudio.RemoveSoundGroupFromDuckList ( string  sType)
static

This method will allow you to remove a Sound Group from the list of sounds that cause music in the Playlist to duck.

Parameters
sTypeThe name of the Sound Group.
static void DarkTonic.MasterAudio.MasterAudio.RestartAllPlaylists ( )
static

This method will allow you to restart all Playlists.

static void DarkTonic.MasterAudio.MasterAudio.RestartPlaylist ( )
static

This method will restart the current Playlist in the Playlist Controller. You should not use this if you have more than one Playlist Controller. Use the overloaded method instead, it takes a playlistControllerName parameter.

static void DarkTonic.MasterAudio.MasterAudio.RestartPlaylist ( string  playlistControllerName)
static

This method will restart a Playlist in the Playlist Controller.

Parameters
playlistControllerNameThe Playlist Controller.
static void DarkTonic.MasterAudio.MasterAudio.RouteGroupToBus ( string  sType,
string  busName 
)
static

Change the bus of a Sound Group.

Parameters
sTypeSound Group name
busNameThe new bus name. Use null for "route to [No Bus]"
static void DarkTonic.MasterAudio.MasterAudio.SetBusVolumeByName ( string  busName,
float  newVolume 
)
static

This method will set the volume of a bus.

Parameters
newVolumeThe volume to set the bus to.
busNameThe bus name.
static void DarkTonic.MasterAudio.MasterAudio.SetGroupVolume ( string  sType,
float  volumeLevel 
)
static

This method will set the volume of a Sound Group.

Parameters
sTypeThe name of the Sound Group
volumeLevelThe new volume level.
static void DarkTonic.MasterAudio.MasterAudio.SoloBus ( string  busName)
static

This method allows you to solo all Groups in a bus.

Parameters
busNameThe name of the bus to solo.
static void DarkTonic.MasterAudio.MasterAudio.SoloGroup ( string  sType,
bool  shouldCheckMuteStatus = true 
)
static

This method will solo a Sound Group. If anything is soloed, only soloed Sound Groups will be heard.

Parameters
sTypeThe name of the Sound Group
shouldCheckMuteStatusWhether or not we should immediately go and silence other non-soloed Groups after soloing this one.
static bool DarkTonic.MasterAudio.MasterAudio.SoundGroupExists ( string  sType)
static

This method allows you to check if a Sound Group exists.

Parameters
sTypeThe name of the Sound Group to check.
Returns
Whether or not the Sound Group exists.
static void DarkTonic.MasterAudio.MasterAudio.StartPlaylist ( string  playlistName)
static

This method is used to start a Playlist whether it's already loaded and playing or not.

Parameters
playlistNameThe name of the Playlist to start
static void DarkTonic.MasterAudio.MasterAudio.StartPlaylist ( string  playlistControllerName,
string  playlistName,
string  clipName = null 
)
static

This method is used to start a Playlist whether it's already loaded and playing or not.

Parameters
playlistControllerNameThe name of the Playlist Controller to use
playlistNameThe name of the Playlist to start
clipNameOptional - The name of the Clip to play
static void DarkTonic.MasterAudio.MasterAudio.StartPlaylistOnClip ( string  playlistName,
string  clipName 
)
static

This method is used to start a Playlist whether it's already loaded and playing or not, on a specific Clip.

Parameters
playlistNameThe name of the Playlist to start
clipNameThe name of the Clip to play
static void DarkTonic.MasterAudio.MasterAudio.StopAllOfSound ( string  sType)
static

This method allows you to abruptly stop all sounds in a specified Sound Group.

Parameters
sTypeThe name of the Sound Group.
static void DarkTonic.MasterAudio.MasterAudio.StopAllPlaylists ( )
static

This method will allow you to stop all Playlist Controllers.

static void DarkTonic.MasterAudio.MasterAudio.StopAllPlaylistsAfterCurrentSongs ( )
static

This method will stop the Playlist after the current song on all Playlist Controllers.

static void DarkTonic.MasterAudio.MasterAudio.StopAllSoundsOfTransform ( Transform  sourceTrans)
static

This method allows you to abruptly stop all sounds triggered by or following a Transform.

Parameters
sourceTransThe Transform the sound was triggered to follow or use the position of.
static void DarkTonic.MasterAudio.MasterAudio.StopBus ( string  busName)
static

This method allows you to stop all Audio Sources in a bus.

Parameters
busNameThe name of the bus to stop.
static void DarkTonic.MasterAudio.MasterAudio.StopBusOfTransform ( Transform  sourceTrans,
string  busName 
)
static

This method allows you to stop all sounds of a particular Bus triggered by or following a Transform

Parameters
sourceTransThe Transform the sound was triggered to follow or use the position of.
busNameThe name of the Bus.
static void DarkTonic.MasterAudio.MasterAudio.StopEverything ( )
static

This method allows you to stop all Audio Sources in the mixer and Playlists as well.

static void DarkTonic.MasterAudio.MasterAudio.StopLoopingAllCurrentSongs ( )
static

This method will stop looping the current song on all Playlist Controllers so the next can play when it's finished (if auto-advance is on).

static void DarkTonic.MasterAudio.MasterAudio.StopLoopingCurrentSong ( )
static

This method will stop looping the current song so the next can play when it's finished (if auto-advance is on). Use this method when only one Playlist Controller exists.

static void DarkTonic.MasterAudio.MasterAudio.StopLoopingCurrentSong ( string  playlistControllerName)
static

This method will stop looping the current song so the next can play when it's finished (if auto-advance is on). Use this method when more than one Playlist Controller exists.

Parameters
playlistControllerNameThe name of the Playlist Controller.
static void DarkTonic.MasterAudio.MasterAudio.StopMixer ( )
static

This method allows you to stop all Audio Sources in the mixer (everything but Playlists).

static void DarkTonic.MasterAudio.MasterAudio.StopOldBusVoices ( string  busName,
float  minimumPlayTime 
)
static

This method allows you to stop voices on a Bus that have been playing for at least X seconds.

Parameters
busNameThe name of the bus to fade.
minimumPlayTimeThe minimum time that each Variation must have been playing to be stopped.
static void DarkTonic.MasterAudio.MasterAudio.StopOldSoundGroupVoices ( string  sType,
float  minimumPlayTime 
)
static

This method allows you to stop voices on a Sound Group that have been playing for at least X seconds.

Parameters
sTypeThe name of the Sound Group to stop.
minimumPlayTimeThe minimum time that each Variation must have been playing to be stopped.
static void DarkTonic.MasterAudio.MasterAudio.StopPlaylist ( )
static

This method will stop a Playlist Controller. You should not use this if you have more than one Playlist Controller. Use the overloaded method instead, it takes a playlistControllerName parameter.

static void DarkTonic.MasterAudio.MasterAudio.StopPlaylist ( string  playlistControllerName)
static

This method will stop a Playlist Controller by name.

Parameters
playlistControllerNameThe name of the Playlist Controller.
static void DarkTonic.MasterAudio.MasterAudio.StopPlaylistAfterCurrentSong ( )
static

This method will stop the Playlist after the current song.

static void DarkTonic.MasterAudio.MasterAudio.StopPlaylistAfterCurrentSong ( string  playlistControllerName)
static

This method will stop the Playlist after the current song. Use this method when more than one Playlist Controller exists.

Parameters
playlistControllerNameThe name of the Playlist Controller.
static void DarkTonic.MasterAudio.MasterAudio.StopSoundGroupOfTransform ( Transform  sourceTrans,
string  sType 
)
static

This method allows you to abruptly stop all sounds of a particular Sound Group triggered by or following a Transform.

Parameters
sourceTransThe Transform the sound was triggered to follow or use the position of.
sTypeThe name of the Sound Group to stop.
static void DarkTonic.MasterAudio.MasterAudio.SubscribeToLastVariationPlayed ( string  sType,
System.Action  finishedCallback 
)
static

Use this method if you want to be notified when the last Variation in a Sound Group has finished playing (all have played).

Parameters
sTypeThe name of the Sound Group
finishedCallbackCode to execute when the last Variation finishes playing
static void DarkTonic.MasterAudio.MasterAudio.ToggleMuteAllPlaylists ( )
static

This method will allow you to toggle mute on all Playlist Controllers.

static void DarkTonic.MasterAudio.MasterAudio.ToggleMuteBus ( string  busName)
static

This will mute the bus if unmuted, and vice versa

Parameters
busNameName of the bus to toggle mute of
static void DarkTonic.MasterAudio.MasterAudio.ToggleMutePlaylist ( )
static

This method will allow you to toggle mute on your Playlist Controller. You should not use this if you have more than one Playlist Controller. Use the overloaded method instead, it takes a playlistControllerName parameter.

static void DarkTonic.MasterAudio.MasterAudio.ToggleMutePlaylist ( string  playlistControllerName)
static

This method will allow you to toggle mute on a Playlist Controller by name.

Parameters
playlistControllerNameThe name of the Playlist Controller.
static void DarkTonic.MasterAudio.MasterAudio.TriggerNextClipAllPlaylists ( )
static

This method will allow you to advance Playlists in all Playlist Controllers to the next clip in their Playlist.

static void DarkTonic.MasterAudio.MasterAudio.TriggerNextPlaylistClip ( )
static

This method will advance the Playlist to the next clip in your Playlist Controller. You should not use this if you have more than one Playlist Controller. Use the overloaded method instead, it takes a playlistControllerName parameter.

static void DarkTonic.MasterAudio.MasterAudio.TriggerNextPlaylistClip ( string  playlistControllerName)
static

This method will advance the Playlist to the next clip in the Playlist Controller you name.

Parameters
playlistControllerNameThe name of the Playlist Controller.
static bool DarkTonic.MasterAudio.MasterAudio.TriggerPlaylistClip ( string  clipName)
static

This method will play an Audio Clip by name that's in the current Playlist of your Playlist Controller. You should not use this if you have more than one Playlist Controller. Use the overloaded method instead, it takes a playlistControllerName parameter.

Parameters
clipNameThe name of the clip.
Returns
bool - whether the song was played or not.
static bool DarkTonic.MasterAudio.MasterAudio.TriggerPlaylistClip ( string  playlistControllerName,
string  clipName 
)
static

This method will play an Audio Clip by name that's in the current Playlist of the Playlist Controller you name.

Parameters
clipNameThe name of the clip.
playlistControllerNameThe name of the Playlist Controller.
Returns
bool - whether the song was played or not.
static void DarkTonic.MasterAudio.MasterAudio.TriggerRandomClipAllPlaylists ( )
static

This method will allow you to play a random clip in all Playlist Controllers using their currenct Playlist

static void DarkTonic.MasterAudio.MasterAudio.TriggerRandomPlaylistClip ( )
static

This method will play a random clip in the current Playlist for your Playlist Controller. You should not use this if you have more than one Playlist Controller. Use the overloaded method instead, it takes a playlistControllerName parameter.

static void DarkTonic.MasterAudio.MasterAudio.TriggerRandomPlaylistClip ( string  playlistControllerName)
static

This method will play a random clip in the current Playlist for the Playlist Controller you name.

Parameters
playlistControllerNameThe name of the Playlist Controller.
static void DarkTonic.MasterAudio.MasterAudio.UnmuteAllPlaylists ( )
static

This method will allow you to unmute all Playlist Controllers.

static void DarkTonic.MasterAudio.MasterAudio.UnmuteBus ( string  busName,
bool  shouldCheckMuteStatus = true 
)
static

This method allows you to unmute all Groups in a bus.

Parameters
busNameThe name of the bus to unmute.
shouldCheckMuteStatusWhether or not we should immediately go and silence other non-soloed Groups after soloing this one.
static void DarkTonic.MasterAudio.MasterAudio.UnmuteEverything ( )
static

This method allows you to unmute all Audio Sources in the mixer and Playlists as well.

static void DarkTonic.MasterAudio.MasterAudio.UnmuteGroup ( string  sType,
bool  shouldCheckMuteStatus = true 
)
static

This method will unmute all variations in a Sound Group

Parameters
sTypeThe name of the Sound Group
shouldCheckMuteStatusWhether or not we should immediately go and silence other non-soloed Groups after soloing this one.
static void DarkTonic.MasterAudio.MasterAudio.UnmutePlaylist ( )
static

This method will allow you to unmute your Playlist Controller. You should not use this if you have more than one Playlist Controller. Use the overloaded method instead, it takes a playlistControllerName parameter.

static void DarkTonic.MasterAudio.MasterAudio.UnmutePlaylist ( string  playlistControllerName)
static

This method will allow you to unmute a Playlist Controller by name.

Parameters
playlistControllerNameThe name of the Playlist Controller.
static void DarkTonic.MasterAudio.MasterAudio.UnpauseAllPlaylists ( )
static

This method will allow you to unpause all paused Playlist Controllers.

static void DarkTonic.MasterAudio.MasterAudio.UnpauseAllSoundsOfTransform ( Transform  sourceTrans)
static

This method allows you to unpause all sounds triggered by or following a Transform.

Parameters
sourceTransThe Transform the sound was triggered to follow or use the position of.
static void DarkTonic.MasterAudio.MasterAudio.UnpauseBus ( string  busName)
static

This method allows you to unpause all paused Audio Sources in a bus.

Parameters
busNameThe name of the bus to unpause.
static void DarkTonic.MasterAudio.MasterAudio.UnpauseBusOfTransform ( Transform  sourceTrans,
string  busName 
)
static

This method allows you to unpause all sounds of a particular Bus triggered by or following a Transform

Parameters
sourceTransThe Transform the sound was triggered to follow or use the position of.
busNameThe name of the Bus.
static void DarkTonic.MasterAudio.MasterAudio.UnpauseEverything ( )
static

This method allows you to unpause all Audio Sources in the mixer and Playlists as well.

static void DarkTonic.MasterAudio.MasterAudio.UnpauseMixer ( )
static

This method allows you to unpause all Audio Sources in the mixer (everything but Playlists).

static void DarkTonic.MasterAudio.MasterAudio.UnpausePlaylist ( )
static

This method will allow you to unpause a paused Playlist Controller. You should not use this if you have more than one Playlist Controller. Use the overloaded method instead, it takes a playlistControllerName parameter.

static void DarkTonic.MasterAudio.MasterAudio.UnpausePlaylist ( string  playlistControllerName)
static

This method will allow you to unpause a paused Playlist Controller by name.

Parameters
playlistControllerNameThe name of the Playlist Controller.
static void DarkTonic.MasterAudio.MasterAudio.UnpauseSoundGroup ( string  sType)
static

This method allows you to unpause all Audio Sources in a Sound Group.

Parameters
sTypeThe name of the Sound Group to unpause.
static void DarkTonic.MasterAudio.MasterAudio.UnpauseSoundGroupOfTransform ( Transform  sourceTrans,
string  sType 
)
static

This method allows you to unpause all sounds of a particular Sound Group triggered by or following a Transform.

Parameters
sourceTransThe Transform the sound was triggered to follow or use the position of.
sTypeThe name of the Sound Group to stop.
static void DarkTonic.MasterAudio.MasterAudio.UnsoloBus ( string  busName,
bool  shouldCheckMuteStatus = true 
)
static

This method allows you to unsolo all Groups in a bus.

Parameters
busNameThe name of the bus to unsolo.
shouldCheckMuteStatusWhether or not we should immediately go and silence other non-soloed Groups after soloing this one.
static void DarkTonic.MasterAudio.MasterAudio.UnsoloGroup ( string  sType,
bool  shouldCheckMuteStatus = true 
)
static

This method will unsolo a Sound Group.

Parameters
sTypeThe name of the Sound Group
shouldCheckMuteStatusWhether or not we should immediately go and silence other non-soloed Groups after soloing this one.
static void DarkTonic.MasterAudio.MasterAudio.UnsubscribeFromAllVariations ( )
static

This method allows you to unsubscribe from all SoundFinished events in the entire MA hierarchy in your Scene.

static void DarkTonic.MasterAudio.MasterAudio.UnsubscribeFromLastVariationPlayed ( string  sType)
static

Use this method to cease notifications added by SubscribeToLastVariationPlayed.

Parameters
sTypeThe name of the Sound Group
static int DarkTonic.MasterAudio.MasterAudio.VoicesForGroup ( string  sType)
static

Returns total number of Audio Sources for this Sound Group.

Parameters
sTypeName of the Sound Group
Returns

Property Documentation

bool DarkTonic.MasterAudio.MasterAudio.AppIsShuttingDown
staticgetset

This property is used to prevent bogus Unity errors while the editor is stopping play. You should never need to read or set

List<string> DarkTonic.MasterAudio.MasterAudio.BusNames
get

This will return a list of all the Bus names, including the selectors for "type in" and "no bus".

List<string> DarkTonic.MasterAudio.MasterAudio.CustomEventNames
get

This will return a list of all the Custom Events you have defined, including the selectors for "type in" and "none".

List<string> DarkTonic.MasterAudio.MasterAudio.CustomEventNamesOnly
get

This will return a list of all the Custom Events you have defined, not including the selectors for "type in" and "none".

SystemLanguage DarkTonic.MasterAudio.MasterAudio.DynamicLanguage
staticgetset

This gets or sets the "Dynamic Language" (needs to be set at runtime based on the user's selection) for use with localized Resource Files.

bool DarkTonic.MasterAudio.MasterAudio.EnableMusicDucking
getset

This gets or sets whether music ducking is enabled.

List<GroupBus> DarkTonic.MasterAudio.MasterAudio.GroupBuses
staticget

This returns of list of all Buses.

List<string> DarkTonic.MasterAudio.MasterAudio.GroupNames
get

This will return a list of all the Sound Group names.

MasterAudio DarkTonic.MasterAudio.MasterAudio.Instance
staticgetset

This property returns a reference to the Singleton instance of

bool DarkTonic.MasterAudio.MasterAudio.LogOutOfVoices
staticgetset

This gets or sets whether Logging Out Of Voices scenarios are enabled in Master Audio

bool DarkTonic.MasterAudio.MasterAudio.LogSoundsEnabled
staticgetset

This gets or sets whether Logging is enabled in Master Audio

float DarkTonic.MasterAudio.MasterAudio.MasterCrossFadeTime
get

This gets the cross-fade time for Playlists

float DarkTonic.MasterAudio.MasterAudio.MasterVolumeLevel
staticgetset

This is the overall master volume level which can change the relative volume of all buses and Sound Groups - not Playlist Controller songs though, they have their own master volume.

bool DarkTonic.MasterAudio.MasterAudio.MixerMuted
staticgetset

This gets or sets whether the entire Mixer is muted or not.

List<Playlist> DarkTonic.MasterAudio.MasterAudio.MusicPlaylists
staticget

This property will return all the Playlists set up in the Master Audio game object.

float DarkTonic.MasterAudio.MasterAudio.PlaylistMasterVolume
staticgetset

This Property can read and set the Playlist Master Volume.

List<string> DarkTonic.MasterAudio.MasterAudio.PlaylistNames
get

This will return a list of all the Playlists, including the selectors for "type in" and "no bus".

List<string> DarkTonic.MasterAudio.MasterAudio.PlaylistNamesOnly
get

This will return a list of all the Playlists, not including the selectors for "type in" and "no bus".

bool DarkTonic.MasterAudio.MasterAudio.PlaylistsMuted
staticgetset

This gets or sets whether the all Playlists are muted or not.

List<string> DarkTonic.MasterAudio.MasterAudio.RuntimeBusNames
staticget

This will get you the list of all Bus Names at runtime only.

List<string> DarkTonic.MasterAudio.MasterAudio.RuntimeSoundGroupNames
staticget

This will get you the list of all Sound Group Names at runtime only.

MasterAudio DarkTonic.MasterAudio.MasterAudio.SafeInstance
staticget

This property returns a reference to the Singleton instance of MasterAudio, but does not log anything to the console. This is used by PersistentAudioSettings script only.

bool DarkTonic.MasterAudio.MasterAudio.SoundsReady
staticget

This returns true if MasterAudio is initialized and ready to use, false otherwise.


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