![]() |
AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
|
The UAudioManager class is a singleton that provides organization and control of an application's AudioEvents. Designers and coders can share the names of the AudioEvents to enable rapid iteration on the application's sound similar to how XAML is used for user interfaces. More...
Public Member Functions | |
| void | PlayEvent (string eventName) |
| Plays an AudioEvent. More... | |
| void | PlayEvent (string eventName, GameObject emitter, string messageOnAudioEnd=null) |
| Plays an AudioEvent. More... | |
| void | PlayEvent (string eventName, AudioSource primarySource, AudioSource secondarySource=null) |
| Plays an AudioEvent. More... | |
| void | StopEventsOnGameObject (string eventName, GameObject gameObjectToStop, float fadeOutTime=0f) |
| Stop event by gameObject. More... | |
| void | StopAllEvents (string eventName, GameObject emitter=null, float fadeOutTime=0f) |
| Stops all events by name. More... | |
| void | StopAll (GameObject emitter=null, float fadeOutTime=0f) |
| Stops all. More... | |
| void | StopEvent (string eventName, GameObject emitter=null, float fadeOutTime=0f) |
| Stops an AudioEvent. More... | |
| void | SetPitch (string eventName, float newPitch) |
| Sets the pitch value on active AudioEvents. More... | |
| void | SetLoopingContainerFrequency (string eventName, float newLoopTime) |
| Sets an AudioEvent's container loop frequency More... | |
| void | ModulateVolume (string eventName, GameObject emitter, float volume) |
| Sets the volume for active AudioEvents. More... | |
Public Member Functions inherited from HoloToolkit.Unity.UAudioManagerBase< AudioEvent, AudioEventBank > | |
| bool | IsLoaded (TBank bank) |
| void | LoadBank (TBank bank) |
| void | UnloadBank (TBank bank) |
| void | StopAllEvents () |
| Stops all ActiveEvents More... | |
| void | StopAllEvents (float fadeTime) |
| Fades out all of the events over fadeTime and stops once completely faded out. More... | |
| void | StopAllEvents (GameObject emitter) |
| Stops all events on a single emitter. More... | |
| void | StopAllEvents (AudioSource emitter) |
| Stops all events on one AudioSource. More... | |
Protected Member Functions | |
| new void | Awake () |
| override void | BanksChanged () |
| Update the dictionary of available audio events. More... | |
Protected Member Functions inherited from HoloToolkit.Unity.UAudioManagerBase< AudioEvent, AudioEventBank > | |
| void | Awake () |
| void | OnDestroy () |
| void | PlayContainer (ActiveEvent activeEvent) |
| Determine which rules to follow for container playback, and begin the appropriate function. More... | |
| void | StopEvent (ActiveEvent activeEvent) |
| Stop audio sources in an event, and clean up instance references. More... | |
| IEnumerator | StopEventWithFadeCoroutine (ActiveEvent activeEvent, float fadeTime) |
| Coroutine for fading out an AudioSource, and stopping the event once fade is complete. More... | |
| int | GetInstances (string eventName) |
| Return the number of instances matching the name eventName for instance limiting check. More... | |
Properties | |
| Func< GameObject, GameObject > | AudioEmitterTransform [get, set] |
| Optional transformation applied to the audio event emitter passed to calls to play event. This allows events to be redirected to a different emitter. More... | |
| static UAudioManager | Instance [get] |
Additional Inherited Members | |
Public Attributes inherited from HoloToolkit.Unity.UAudioManagerBase< AudioEvent, AudioEventBank > | |
| TBank [] | DefaultBanks |
Protected Attributes inherited from HoloToolkit.Unity.UAudioManagerBase< AudioEvent, AudioEventBank > | |
| TEvent [] | Events |
| const float | InfiniteLoop |
| List< ActiveEvent > | ActiveEvents |
| List< TBank > | LoadedBanks |
The UAudioManager class is a singleton that provides organization and control of an application's AudioEvents. Designers and coders can share the names of the AudioEvents to enable rapid iteration on the application's sound similar to how XAML is used for user interfaces.
Definition at line 15 of file UAudioManager.cs.
|
protected |
Definition at line 44 of file UAudioManager.cs.
|
protectedvirtual |
Update the dictionary of available audio events.
Reimplemented from HoloToolkit.Unity.UAudioManagerBase< AudioEvent, AudioEventBank >.
Definition at line 446 of file UAudioManager.cs.
| void HoloToolkit.Unity.UAudioManager.ModulateVolume | ( | string | eventName, |
| GameObject | emitter, | ||
| float | volume | ||
| ) |
Sets the volume for active AudioEvents.
| eventName | The name associated with the AudioEvents. |
| emitter | The GameObject associated, as the audio emitter, for the AudioEvents. |
| volume | The new volume. |
Definition at line 324 of file UAudioManager.cs.
| void HoloToolkit.Unity.UAudioManager.PlayEvent | ( | string | eventName | ) |
Plays an AudioEvent.
| eventName | The name associated with the AudioEvent. |
The AudioEvent is attached to the same GameObject as this script.
Definition at line 56 of file UAudioManager.cs.
| void HoloToolkit.Unity.UAudioManager.PlayEvent | ( | string | eventName, |
| GameObject | emitter, | ||
| string | messageOnAudioEnd = null |
||
| ) |
Plays an AudioEvent.
| eventName | The name associated with the AudioEvent. |
| emitter | The GameObject on which the AudioEvent is to be played. |
| messageOnAudioEnd | The Message to Send to the GameObject when the sound has finished playing. |
Definition at line 67 of file UAudioManager.cs.
| void HoloToolkit.Unity.UAudioManager.PlayEvent | ( | string | eventName, |
| AudioSource | primarySource, | ||
| AudioSource | secondarySource = null |
||
| ) |
Plays an AudioEvent.
| eventName | The name associated with the AudioEvent. |
| primarySource | The AudioSource component to use as the primary source for the event. |
| secondarySource | The AudioSource component to use as the secondary source for the event. |
Definition at line 78 of file UAudioManager.cs.
| void HoloToolkit.Unity.UAudioManager.SetLoopingContainerFrequency | ( | string | eventName, |
| float | newLoopTime | ||
| ) |
Sets an AudioEvent's container loop frequency
| eventName | The name associated with the AudioEvent. |
| newLoopTime | The new loop time in seconds. |
Definition at line 299 of file UAudioManager.cs.
| void HoloToolkit.Unity.UAudioManager.SetPitch | ( | string | eventName, |
| float | newPitch | ||
| ) |
Sets the pitch value on active AudioEvents.
| eventName | The name associated with the AudioEvents. |
| newPitch | The value to set the pitch, between 0 (exclusive) and 3 (inclusive). |
Definition at line 276 of file UAudioManager.cs.
| void HoloToolkit.Unity.UAudioManager.StopAll | ( | GameObject | emitter = null, |
| float | fadeOutTime = 0f |
||
| ) |
Stops all.
| fadeOutTime | The amount of time in seconds to completely fade out the sound. |
Definition at line 219 of file UAudioManager.cs.
| void HoloToolkit.Unity.UAudioManager.StopAllEvents | ( | string | eventName, |
| GameObject | emitter = null, |
||
| float | fadeOutTime = 0f |
||
| ) |
Stops all events by name.
| eventName | The name associated with the AudioEvent. |
| fadeOutTime | The amount of time in seconds to completely fade out the sound. |
Definition at line 194 of file UAudioManager.cs.
| void HoloToolkit.Unity.UAudioManager.StopEvent | ( | string | eventName, |
| GameObject | emitter = null, |
||
| float | fadeOutTime = 0f |
||
| ) |
Stops an AudioEvent.
| eventName | The name associated with the AudioEvent. |
| emitter | The GameObject on which the AudioEvent will stopped. |
| fadeTime | The amount of time in seconds to completely fade out the sound. |
Definition at line 242 of file UAudioManager.cs.
| void HoloToolkit.Unity.UAudioManager.StopEventsOnGameObject | ( | string | eventName, |
| GameObject | gameObjectToStop, | ||
| float | fadeOutTime = 0f |
||
| ) |
Stop event by gameObject.
| eventName | |
| gameObjectToStop | |
| fadeOutTime |
Definition at line 175 of file UAudioManager.cs.
|
getset |
Optional transformation applied to the audio event emitter passed to calls to play event. This allows events to be redirected to a different emitter.
This class is a singleton, the last transform set will be applied to all audio emitters when their state changes (from stopped to playing, volume changes, etc).
Definition at line 31 of file UAudioManager.cs.
|
staticget |
Definition at line 40 of file UAudioManager.cs.