AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
HoloToolkit.Unity.UAudioManagerBase< TEvent, TBank > Class Template Reference

UAudioManagerBase provides the base functionality for UAudioManager classes. More...

Inheritance diagram for HoloToolkit.Unity.UAudioManagerBase< TEvent, TBank >:

Public Member Functions

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...
 

Public Attributes

TBank [] DefaultBanks = null
 

Protected Member Functions

void Awake ()
 
void OnDestroy ()
 
virtual void BanksChanged ()
 
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...
 

Protected Attributes

TEvent [] Events = null
 
const float InfiniteLoop = -1
 
List< ActiveEventActiveEvents
 
List< TBank > LoadedBanks
 

Detailed Description

UAudioManagerBase provides the base functionality for UAudioManager classes.

Template Parameters
TEventThe type of AudioEvent being managed.
TBank

The TEvent type specified must derive from AudioEvent.

Type Constraints
TEvent :AudioEvent 
TEvent :new() 
TBank :AudioBank<TEvent> 
TBank :new() 

Definition at line 18 of file UAudioManagerBase.cs.

Member Function Documentation

§ Awake()

void HoloToolkit.Unity.UAudioManagerBase< TEvent, TBank >.Awake ( )
protected

Definition at line 41 of file UAudioManagerBase.cs.

§ BanksChanged()

virtual void HoloToolkit.Unity.UAudioManagerBase< TEvent, TBank >.BanksChanged ( )
protectedvirtual

Reimplemented in HoloToolkit.Unity.UAudioManager.

Definition at line 61 of file UAudioManagerBase.cs.

§ GetInstances()

int HoloToolkit.Unity.UAudioManagerBase< TEvent, TBank >.GetInstances ( string  eventName)
protected

Return the number of instances matching the name eventName for instance limiting check.

Parameters
eventNameThe name of the event to check.
Returns
The number of instances of that event currently active.

Definition at line 682 of file UAudioManagerBase.cs.

§ IsLoaded()

bool HoloToolkit.Unity.UAudioManagerBase< TEvent, TBank >.IsLoaded ( TBank  bank)

Definition at line 65 of file UAudioManagerBase.cs.

§ LoadBank()

void HoloToolkit.Unity.UAudioManagerBase< TEvent, TBank >.LoadBank ( TBank  bank)

Definition at line 70 of file UAudioManagerBase.cs.

§ OnDestroy()

void HoloToolkit.Unity.UAudioManagerBase< TEvent, TBank >.OnDestroy ( )
protected

Definition at line 56 of file UAudioManagerBase.cs.

§ PlayContainer()

void HoloToolkit.Unity.UAudioManagerBase< TEvent, TBank >.PlayContainer ( ActiveEvent  activeEvent)
protected

Determine which rules to follow for container playback, and begin the appropriate function.

Parameters
activeEventThe event to play.

Definition at line 188 of file UAudioManagerBase.cs.

§ StopAllEvents() [1/4]

void HoloToolkit.Unity.UAudioManagerBase< TEvent, TBank >.StopAllEvents ( )

Stops all ActiveEvents

Definition at line 92 of file UAudioManagerBase.cs.

§ StopAllEvents() [2/4]

void HoloToolkit.Unity.UAudioManagerBase< TEvent, TBank >.StopAllEvents ( float  fadeTime)

Fades out all of the events over fadeTime and stops once completely faded out.

Parameters
fadeTimeThe amount of time, in seconds, to fade between current volume and 0.

Definition at line 104 of file UAudioManagerBase.cs.

§ StopAllEvents() [3/4]

void HoloToolkit.Unity.UAudioManagerBase< TEvent, TBank >.StopAllEvents ( GameObject  emitter)

Stops all events on a single emitter.

Definition at line 115 of file UAudioManagerBase.cs.

§ StopAllEvents() [4/4]

void HoloToolkit.Unity.UAudioManagerBase< TEvent, TBank >.StopAllEvents ( AudioSource  emitter)

Stops all events on one AudioSource.

Definition at line 129 of file UAudioManagerBase.cs.

§ StopEvent()

void HoloToolkit.Unity.UAudioManagerBase< TEvent, TBank >.StopEvent ( ActiveEvent  activeEvent)
protected

Stop audio sources in an event, and clean up instance references.

Parameters
activeEventThe persistent reference to the event as long as it is playing.

Definition at line 573 of file UAudioManagerBase.cs.

§ StopEventWithFadeCoroutine()

IEnumerator HoloToolkit.Unity.UAudioManagerBase< TEvent, TBank >.StopEventWithFadeCoroutine ( ActiveEvent  activeEvent,
float  fadeTime 
)
protected

Coroutine for fading out an AudioSource, and stopping the event once fade is complete.

Parameters
activeEventThe persistent reference to the event as long as it is playing.
fadeTimeThe amount of time, in seconds, to completely fade out the sound.
Returns
The coroutine.

Definition at line 595 of file UAudioManagerBase.cs.

§ UnloadBank()

void HoloToolkit.Unity.UAudioManagerBase< TEvent, TBank >.UnloadBank ( TBank  bank)

Definition at line 83 of file UAudioManagerBase.cs.

Member Data Documentation

§ ActiveEvents

List<ActiveEvent> HoloToolkit.Unity.UAudioManagerBase< TEvent, TBank >.ActiveEvents
protected

Definition at line 27 of file UAudioManagerBase.cs.

§ DefaultBanks

TBank [] HoloToolkit.Unity.UAudioManagerBase< TEvent, TBank >.DefaultBanks = null

Definition at line 20 of file UAudioManagerBase.cs.

§ Events

TEvent [] HoloToolkit.Unity.UAudioManagerBase< TEvent, TBank >.Events = null
protected

Definition at line 24 of file UAudioManagerBase.cs.

§ InfiniteLoop

const float HoloToolkit.Unity.UAudioManagerBase< TEvent, TBank >.InfiniteLoop = -1
protected

Definition at line 26 of file UAudioManagerBase.cs.

§ LoadedBanks

List<TBank> HoloToolkit.Unity.UAudioManagerBase< TEvent, TBank >.LoadedBanks
protected

Definition at line 39 of file UAudioManagerBase.cs.


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