AudioController Methods

ClockStone Audio Toolkit

AudioController Methods

The AudioController type exposes the following members.

Methods
  NameDescription
Public methodStatic memberAddPlaylist
Adds a new playlist.
Public methodStatic memberCode exampleAddToCategory(AudioCategory, AudioItem)
Adds a custom audio item to a category.
Public methodStatic memberAddToCategory(AudioCategory, AudioClip, String)
Creates an AudioItem with the name audioID containing a single subitem playing the specified custom AudioClip. This AudioItem is then added to the specified category.
Public methodStatic memberClearPlaylists
Clears all music playlist.
Public methodStatic memberDetachAllAudios
Detaches all audio objects possibly parented to the specified game object.
Public methodStatic memberEnableAmbienceSound
Enables the ambience sound.
Public methodStatic memberEnableMusic
Enables the music.
Public methodStatic memberEnqueueMusic
Enqueues an audio ID to the music playlist queue.
Public methodStatic memberFadeInCategory
Starts a fade-in of an audio category.
Public methodStatic memberFadeOutCategory
Starts a fade-out of an audio category.
Public methodStatic memberGetAudioItem
Returns the AudioItem with the given audioID.
Public methodStatic memberGetAudioItemMaxDistance
Gets the audio item's max distance. (respects all proper default values and overwrites).
Public methodStatic memberGetCategory
Gets a category.
Public methodStatic memberGetCategoryVolume
Gets the category volume.
Public methodStatic memberGetCurrentAmbienceSound
Gets the current ambience sound.
Public methodStatic memberGetCurrentAudioListener
Gets the currently active Unity audio listener.
Public methodStatic memberGetCurrentMusic
Gets the current music.
Public methodStatic memberGetGlobalVolume
Gets the global volume.
Public methodStatic memberGetMusicPlaylist
If playlistName == null then gets a copy of the current playlist audioID array, otherwise gets a copy of the playlist with the specified name
Public methodStatic memberGetPlayingAudioObjects(Boolean)
Returns an array of all playing audio objects.
Public methodStatic memberGetPlayingAudioObjects(String, Boolean)
Returns an array of all playing audio objects with the specified audioID.
Public methodStatic memberGetPlayingAudioObjectsCount
Returns the number of all playing audio objects with the specified audioID.
Public methodStatic memberGetPlayingAudioObjectsInCategory
Returns an array of all playing audio objects in the category with name categoryName.
Public methodGetPlaylistByName
Retrieves a playlist by name. If playlists are named identically it will return the first one it finds
Public methodInitializeAudioItems
Updates the internal audioID dictionary and initializes all registered AudioItem objects.
Public methodStatic memberIsAmbienceSoundEnabled
Determines whether ambience sound is enabled.
Public methodStatic memberIsAmbienceSoundPaused
Uses to test if ambience sound is paused
Public methodStatic memberIsMusicEnabled
Determines whether music is enabled.
Public methodStatic memberIsMusicPaused
Uses to test if music is paused
Public methodStatic memberIsPlaying
Determines whether the specified audio ID is playing.
Public methodStatic memberIsPlaylistPlaying
Determines whether the playlist is playing.
Public methodStatic memberIsSoundMuted
Determines whether sound is muted
Public methodStatic memberIsValidAudioID
Tests if a given audioID is valid.
Public methodStatic memberMuteSound
Mutes / Unmutes the sound.
Public methodStatic memberNewCategory
Creates a new audio category
Public methodOnAfterDeserialize
Public methodOnBeforeSerialize
Public methodStatic memberPauseAll
Pauses all playing audio items (including the music).
Public methodStatic memberPauseAmbienceSound
Pauses the currently playing ambience sound.
Public methodStatic memberPauseCategory
Pauses all playing audio items in the specified category (including the music).
Public methodStatic memberPauseMusic
Pauses the currently playing music.
Public methodStatic memberPlay(String)
Plays an audio item with the name audioID.
Public methodStatic memberPlay(String, Transform)
Plays an audio item with the name audioID parented to a specified transform.
Public methodStatic memberPlay(String, Vector3, Transform)
Plays an audio item with the name audioID parented to a specified transform with a world offset.
Public methodStatic memberPlay(String, Single, Single, Single)
Plays an audio item with the name audioID.
Public methodStatic memberPlay(String, Transform, Single, Single, Single)
Plays an audio item with the name audioID parented to a specified transform.
Public methodStatic memberPlay(String, Vector3, Transform, Single, Single, Single)
Plays an audio item with the name audioID parented to a specified transform with a world offset.
Public methodStatic memberPlayAfter
Plays an audio item with the name audioID right after the given AudioObject stops playing. (see the Unity AudioSettings.dspTime documentation)
Public methodStatic memberPlayAmbienceSound(String, Single, Single, Single)
Plays an audio item with the name audioID as ambience sound.
Public methodStatic memberPlayAmbienceSound(String, Transform, Single, Single, Single)
Plays an audio item with the name audioID as ambience sound at the specified position.
Public methodStatic memberPlayAmbienceSound(String, Vector3, Transform, Single, Single, Single)
Plays an audio item with the name audioID as ambience sound at the specified position.
Public methodPlayAudioItem
Plays a specific AudioItem.
Public methodPlayAudioSubItem
Plays a specific AudioSubItem.
Public methodStatic memberPlayMusic(String, Single, Single, Single)
Plays an audio item with the name audioID as music.
Public methodStatic memberPlayMusic(String, Transform, Single, Single, Single)
Plays an audio item with the name audioID as music at the specified position.
Public methodStatic memberPlayMusic(String, Vector3, Transform, Single, Single, Single)
Plays an audio item with the name audioID as music at the specified position.
Public methodStatic memberPlayMusicPlaylist
Start playing the music playlist.
Public methodStatic memberPlayNextMusicOnPlaylist
Jumps to the next the music track on the playlist.
Public methodStatic memberPlayPreviousMusicOnPlaylist
Jumps to the previous music track on the playlist.
Public methodStatic memberPlayScheduled
Plays an audio item with the name audioID parented to a specified transform with a world offset scheduled at a specified high precision DSP time (see the Unity AudioSettings.dspTime documentation)
Public methodStatic memberRemoveAudioItem
Removes an AudioItem from the AudioController.
Public methodStatic memberRemoveCategory
Removes an audio category.
Public methodStatic memberSetCategoryVolume
Changes the category volume. Also effects currently playing audio items.
Public methodStatic memberSetCurrentMusicPlaylist
Sets the current playlist to the specified audioID array
Public methodStatic memberSetGlobalVolume
Changes the global volume. Effects all currently playing audio items.
Public methodStatic memberStop(String)
Stops all playing audio items with name audioID.
Public methodStatic memberStop(String, Single)
Stops all playing audio items with name audioID with a fade-out.
Public methodStatic memberStopAll
Immediately stops playing audio items (including the music).
Public methodStatic memberStopAll(Single)
Fades out all playing audio items (including the music).
Public methodStatic memberStopAmbienceSound
Stops the currently playing ambience sound.
Public methodStatic memberStopAmbienceSound(Single)
Stops the currently playing ambience sound with fade-out.
Public methodStatic memberStopCategory
Stops all playing audio items in the specified category (including the music).
Public methodStatic memberStopMusic
Stops the currently playing music.
Public methodStatic memberStopMusic(Single)
Stops the currently playing music with fade-out.
Public methodUnloadAllAudioClips
Unloads all AudioClips specified in this AudioController from memory.
Public methodStatic memberUnpauseAll
Un-pauses all playing audio items (including the music).
Public methodStatic memberUnpauseAmbienceSound
Unpauses the current ambience sound.
Public methodStatic memberUnpauseCategory
Un-pauses all playing audio items in the specified category (including the music).
Public methodStatic memberUnpauseMusic
Unpauses the current music.
Top
See Also