Highroad Engine v1.3
Public Member Functions | Protected Attributes | List of all members
MoreMountains.Tools.MMSoundManagerAudioPool Class Reference

This class manages an object pool of audiosources More...

Public Member Functions

virtual void FillAudioSourcePool (int poolSize, Transform parent)
 Fills the pool with ready-to-use audiosources More...
 
virtual IEnumerator AutoDisableAudioSource (float duration, AudioSource source, AudioClip clip, bool doNotAutoRecycleIfNotDonePlaying)
 Disables an audio source after it's done playing More...
 
virtual AudioSource GetAvailableAudioSource (bool poolCanExpand, Transform parent)
 Pulls an available audio source from the pool More...
 
virtual bool FreeSound (AudioSource sourceToStop)
 Stops an audiosource and returns it to the pool More...
 

Protected Attributes

List< AudioSource > _pool
 

Detailed Description

This class manages an object pool of audiosources

Member Function Documentation

◆ AutoDisableAudioSource()

virtual IEnumerator MoreMountains.Tools.MMSoundManagerAudioPool.AutoDisableAudioSource ( float  duration,
AudioSource  source,
AudioClip  clip,
bool  doNotAutoRecycleIfNotDonePlaying 
)
virtual

Disables an audio source after it's done playing

Parameters
duration
targetObject
Returns

◆ FillAudioSourcePool()

virtual void MoreMountains.Tools.MMSoundManagerAudioPool.FillAudioSourcePool ( int  poolSize,
Transform  parent 
)
virtual

Fills the pool with ready-to-use audiosources

Parameters
poolSize
parent

◆ FreeSound()

virtual bool MoreMountains.Tools.MMSoundManagerAudioPool.FreeSound ( AudioSource  sourceToStop)
virtual

Stops an audiosource and returns it to the pool

Parameters
sourceToStop
Returns

◆ GetAvailableAudioSource()

virtual AudioSource MoreMountains.Tools.MMSoundManagerAudioPool.GetAvailableAudioSource ( bool  poolCanExpand,
Transform  parent 
)
virtual

Pulls an available audio source from the pool

Parameters
poolCanExpand
parent
Returns

Member Data Documentation

◆ _pool

List<AudioSource> MoreMountains.Tools.MMSoundManagerAudioPool._pool
protected

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