Show / Hide Table of Contents

Class SoundManager

Implements sound manager for loading and indexing all sounds for UI

Inheritance
System.Object
SoundManager
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: EmptyKeys.UserInterface.Media
Assembly: EmptyKeys.UserInterface.dll
Syntax
public sealed class SoundManager

Fields

IsSoundEnabledProperty

The is sound enabled property

Declaration
public static readonly DependencyProperty IsSoundEnabledProperty
Field Value
Type Description
DependencyProperty

SoundsProperty

The sounds property

Declaration
public static readonly DependencyProperty SoundsProperty
Field Value
Type Description
DependencyProperty

Properties

Instance

Gets the instance.

Declaration
public static SoundManager Instance { get; }
Property Value
Type Description
SoundManager

The instance.

MasterVolume

Gets or sets the master volume.

Declaration
public float MasterVolume { get; set; }
Property Value
Type Description
System.Single

The master volume.

Methods

AddSound(String)

Adds the sound.

Declaration
public void AddSound(string soundAsset)
Parameters
Type Name Description
System.String soundAsset

The sound asset.

ClearCache()

Clears the cache.

Declaration
public void ClearCache()

GetIsSoundEnabled(DependencyObject)

Gets the is sound enabled.

Declaration
public static bool GetIsSoundEnabled(DependencyObject obj)
Parameters
Type Name Description
DependencyObject obj

The object.

Returns
Type Description
System.Boolean

GetSound(String)

Gets the sound.

Declaration
public SoundBase GetSound(string assetName)
Parameters
Type Name Description
System.String assetName

Name of the asset.

Returns
Type Description
EmptyKeys.UserInterface.Media.SoundBase

GetSounds(DependencyObject)

Gets the sounds.

Declaration
public static SoundSourceCollection GetSounds(DependencyObject obj)
Parameters
Type Name Description
DependencyObject obj

The object.

Returns
Type Description
SoundSourceCollection

LoadSounds(Object, String)

Loads the sounds.

Declaration
public void LoadSounds(object contentManager, string basePath = "")
Parameters
Type Name Description
System.Object contentManager

The content manager.

System.String basePath

The base path.

PlaySoundSource(DependencyObject, SoundType)

Plays the sound source.

Declaration
public void PlaySoundSource(DependencyObject obj, SoundType soundType)
Parameters
Type Name Description
DependencyObject obj

The object.

SoundType soundType

Type of the sound.

SetIsSoundEnabled(DependencyObject, Boolean)

Sets the is sound enabled.

Declaration
public static void SetIsSoundEnabled(DependencyObject obj, bool value)
Parameters
Type Name Description
DependencyObject obj

The object.

System.Boolean value

if set to true [value].

Back to top Generated by DocFX