A simple yet powerful sound manager, that will let you play sounds with an event based approach and performance in mind.  
 More...
|  | 
| virtual AudioSource | PlaySound (AudioClip audioClip, MMSoundManagerPlayOptions options) | 
|  | Plays a sound, separate options object signature. 
 | 
| virtual AudioSource | PlaySound (AudioClip audioClip, MMSoundManagerTracks mmSoundManagerTrack, Vector3 location, bool loop=false, float volume=1.0f, int ID=0, bool fade=false, float fadeInitialVolume=0f, float fadeDuration=1f, MMTweenType fadeTween=null, bool persistent=false, AudioSource recycleAudioSource=null, AudioMixerGroup audioGroup=null, float pitch=1f, float panStereo=0f, float spatialBlend=0.0f, bool soloSingleTrack=false, bool soloAllTracks=false, bool autoUnSoloOnEnd=false, bool bypassEffects=false, bool bypassListenerEffects=false, bool bypassReverbZones=false, int priority=128, float reverbZoneMix=1f, float dopplerLevel=1f, int spread=0, AudioRolloffMode rolloffMode=AudioRolloffMode.Logarithmic, float minDistance=1f, float maxDistance=500f, bool doNotAutoRecycleIfNotDonePlaying=false, float playbackTime=0f, float playbackDuration=0f, Transform attachToTransform=null, bool useSpreadCurve=false, AnimationCurve spreadCurve=null, bool useCustomRolloffCurve=false, AnimationCurve customRolloffCurve=null, bool useSpatialBlendCurve=false, AnimationCurve spatialBlendCurve=null, bool useReverbZoneMixCurve=false, AnimationCurve reverbZoneMixCurve=null, AudioResource audioResourceToPlay=null, float initialDelay=0f) | 
|  | Plays a sound, signature with all options. 
 | 
| virtual void | PauseSound (AudioSource source) | 
|  | Pauses the specified audiosource. 
 | 
| virtual void | ResumeSound (AudioSource source) | 
|  | resumes play on the specified audio source 
 | 
| virtual void | StopSound (AudioSource source) | 
|  | Stops the specified audio source. 
 | 
| virtual void | FreeSound (AudioSource source) | 
|  | Frees a specific sound, stopping it and returning it to the pool. 
 | 
| virtual bool | IsPaused (MMSoundManagerTracks track) | 
|  | Returns true if the specified track is currently paused, false otherwise. 
 | 
| virtual void | MuteTrack (MMSoundManagerTracks track) | 
|  | Mutes an entire track. 
 | 
| virtual void | UnmuteTrack (MMSoundManagerTracks track) | 
|  | Unmutes an entire track. 
 | 
| virtual void | SetTrackVolume (MMSoundManagerTracks track, float volume) | 
|  | Sets the volume of an entire track. 
 | 
| virtual float | GetTrackVolume (MMSoundManagerTracks track, bool mutedVolume) | 
|  | Returns the current volume of a track. 
 | 
| virtual void | PauseTrack (MMSoundManagerTracks track) | 
|  | Pauses all sounds on a track. 
 | 
| virtual void | PlayTrack (MMSoundManagerTracks track) | 
|  | Plays or resumes all sounds on a track. 
 | 
| virtual void | StopTrack (MMSoundManagerTracks track) | 
|  | Stops all sounds on a track. 
 | 
| virtual bool | HasSoundsPlaying (MMSoundManagerTracks track) | 
|  | Returns true if sounds are currently playing on that track. 
 | 
| virtual List< MMSoundManagerSound > | GetSoundsPlaying (MMSoundManagerTracks track) | 
|  | Returns a list of MMSoundManagerSounds for the specified track. 
 | 
| virtual void | FreeTrack (MMSoundManagerTracks track) | 
|  | Stops all sounds on a track, and returns them to the pool. 
 | 
| virtual void | MuteMusic () | 
|  | Mutes the music track, QoL method ready to bind to a UnityEvent. 
 | 
| virtual void | UnmuteMusic () | 
|  | Unmutes the music track, QoL method ready to bind to a UnityEvent. 
 | 
| virtual void | MuteSfx () | 
|  | Mutes the sfx track, QoL method ready to bind to a UnityEvent. 
 | 
| virtual void | UnmuteSfx () | 
|  | Unmutes the sfx track, QoL method ready to bind to a UnityEvent. 
 | 
| virtual void | MuteUI () | 
|  | Mutes the UI track, QoL method ready to bind to a UnityEvent. 
 | 
| virtual void | UnmuteUI () | 
|  | Unmutes the UI track, QoL method ready to bind to a UnityEvent. 
 | 
| virtual void | MuteMaster () | 
|  | Mutes the master track, QoL method ready to bind to a UnityEvent. 
 | 
| virtual void | UnmuteMaster () | 
|  | Unmutes the master track, QoL method ready to bind to a UnityEvent. 
 | 
| virtual void | SetVolumeMusic (float newVolume) | 
|  | Sets the volume of the Music track to the specified value, QoL method, ready to bind to a UnityEvent. 
 | 
| virtual void | SetVolumeSfx (float newVolume) | 
|  | Sets the volume of the SFX track to the specified value, QoL method, ready to bind to a UnityEvent. 
 | 
| virtual void | SetVolumeUI (float newVolume) | 
|  | Sets the volume of the UI track to the specified value, QoL method, ready to bind to a UnityEvent. 
 | 
| virtual void | SetVolumeMaster (float newVolume) | 
|  | Sets the volume of the Master track to the specified value, QoL method, ready to bind to a UnityEvent. 
 | 
| virtual bool | IsMuted (MMSoundManagerTracks track) | 
|  | Returns true if the specified track is muted, false otherwise. 
 | 
| virtual void | FadeTrack (MMSoundManagerTracks track, float duration, float initialVolume=0f, float finalVolume=1f, MMTweenType tweenType=null) | 
|  | Fades an entire track over the specified duration towards the desired finalVolume. 
 | 
| virtual void | FadeSound (AudioSource source, float duration, float initialVolume, float finalVolume, MMTweenType tweenType, bool freeAfterFade=false) | 
|  | Fades a target sound towards a final volume over time. 
 | 
| virtual bool | SoundIsFadingIn (AudioSource source) | 
|  | Returns true if the specified source is already fading, false otherwise. 
 | 
| virtual bool | SoundIsFadingOut (AudioSource source) | 
|  | Returns true if the specified source is already fading, false otherwise. 
 | 
| virtual void | StopFadeTrack (MMSoundManagerTracks track) | 
|  | Stops any fade currently happening on the specified track. 
 | 
| virtual void | StopFadeSound (AudioSource source) | 
|  | Stops any fade currently happening on the specified sound. 
 | 
| virtual void | MuteSoundsOnTrack (MMSoundManagerTracks track, bool mute, float delay=0f) | 
|  | Mutes all sounds playing on a specific track. 
 | 
| virtual void | MuteAllSounds (bool mute=true) | 
|  | Mutes all sounds playing on the MMSoundManager. 
 | 
| virtual AudioSource | FindByID (int ID) | 
|  | Returns an audio source played with the specified ID, if one is found. 
 | 
| virtual AudioSource | FindByClip (AudioClip clip) | 
|  | Returns an audio source played with the specified ID, if one is found. 
 | 
| virtual int | CurrentlyPlayingCount (AudioClip clip) | 
|  | Returns the amount of audiosources currently playing the specified clip on this sound manager. 
 | 
| virtual void | PauseAllSounds () | 
|  | Pauses all sounds playing on the MMSoundManager. 
 | 
| virtual void | PlayAllSounds () | 
|  | Plays all sounds playing on the MMSoundManager. 
 | 
| virtual void | StopAllSounds () | 
|  | Stops all sounds playing on the MMSoundManager. 
 | 
| virtual void | FreeAllSounds () | 
|  | Stops all sounds and returns them to the pool. 
 | 
| virtual void | FreeAllSoundsButPersistent () | 
|  | Stops all sounds except the persistent ones, and returns them to the pool. 
 | 
| virtual void | FreeAllLoopingSounds () | 
|  | Stops all looping sounds and returns them to the pool. 
 | 
| virtual void | OnMMEvent (MMSoundManagerTrackEvent soundManagerTrackEvent) | 
| virtual void | OnMMEvent (MMSoundManagerEvent soundManagerEvent) | 
| virtual void | SaveSettings () | 
|  | Save sound settings to file. 
 | 
| virtual void | LoadSettings () | 
|  | Loads sound settings from file. 
 | 
| virtual void | ResetSettings () | 
|  | Deletes any saved sound settings. 
 | 
| virtual void | OnMMEvent (MMSoundManagerSoundControlEvent soundControlEvent) | 
| virtual void | OnMMEvent (MMSoundManagerTrackFadeEvent trackFadeEvent) | 
| virtual void | OnMMEvent (MMSoundManagerSoundFadeEvent soundFadeEvent) | 
| virtual void | OnMMEvent (MMSoundManagerAllSoundsControlEvent allSoundsControlEvent) | 
| virtual void | OnMMSfxEvent (AudioClip clipToPlay, AudioMixerGroup audioGroup=null, float volume=1f, float pitch=1f, int priority=128) | 
| virtual AudioSource | OnMMSoundManagerSoundPlayEvent (AudioClip clip, MMSoundManagerPlayOptions options) | 
| void | OnMMEvent (T eventType) | 
|  | 
| override void | Awake () | 
|  | On Awake we initialize our manager. 
 | 
| virtual void | Start () | 
|  | On Start we load and apply our saved settings if needed. 
 | 
| virtual void | InitializeSoundManager () | 
|  | Initializes the pool, fills it, registers to the scene loaded event. 
 | 
| virtual void | ControlTrack (MMSoundManagerTracks track, ControlTrackModes trackMode, float volume=0.5f) | 
| virtual IEnumerator | FadeTrackCoroutine (MMSoundManagerTracks track, float duration, float initialVolume, float finalVolume, MMTweenType tweenType) | 
|  | Fades an entire track over time. 
 | 
| virtual IEnumerator | FadeCoroutine (AudioSource source, float duration, float initialVolume, float finalVolume, MMTweenType tweenType, bool freeAfterFade=false) | 
|  | Fades an audiosource's volume over time. 
 | 
| virtual IEnumerator | MuteSoundsOnTrackCoroutine (MMSoundManagerTracks track, bool mute, float delay) | 
|  | Mutes all sounds on the specified track after an optional delay. 
 | 
| virtual IEnumerator | MuteAllSoundsCoroutine (float delay, bool mute=true) | 
|  | Mutes all sounds after an optional delay. 
 | 
| virtual void | OnSceneLoaded (Scene arg0, LoadSceneMode loadSceneMode) | 
|  | Registered on enable, triggers every time a new scene is loaded At which point we free all sounds except the persistent ones. 
 | 
| virtual void | OnEnable () | 
|  | On enable we start listening for events. 
 | 
| virtual void | OnDisable () | 
|  | On disable we stop listening for events. 
 | 
| virtual void | InitializeSingleton () | 
|  | Initializes the singleton. 
 | 
A simple yet powerful sound manager, that will let you play sounds with an event based approach and performance in mind. 
Features :
- Play/stop/pause/resume/free sounds
- Full control : loop, volume, pitch, pan, spatial blend, bypasses, priority, reverb, doppler level, spread, rolloff mode, distance
- 2D & 3D spatial support
- Built-in pooling, automatically recycle a set of audio sources for maximum performance
- Built in audio mixer and groups, with ready-made tracks (Master, Music, SFX, UI), and options to play on more groups if needed
- Stop/pause/resume/free entire tracks
- Stop/pause/resume/free all sounds at once
- Mute / set volume entire tracks
- Save and load settings, with auto save / auto load mechanics built-in
- Fade in/out sounds
- Fade in/out tracks
- Solo mode : play a sound with one or all tracks muted, then unmute them automatically afterwards
- PlayOptions struct
- Option to have sounds persist across scene loads and from scene to scene
- Inspector controls for tracks (volume, mute, unmute, play, pause, stop, resume, free, number of sounds)
- MMSfxEvents
- MMSoundManagerEvents : mute track, control track, save, load, reset, stop persistent sounds