Table of Contents

Struct AudioCategory

Namespace
Microsoft.Xna.Framework.Audio
Assembly
MonoGame.Framework.dll

Provides functionality for manipulating multiple sounds at a time.

public struct AudioCategory : IEquatable<AudioCategory>
Implements
Inherited Members

Properties

Name

Gets the category's friendly name.

public string Name { get; }

Property Value

string

Methods

Equals(AudioCategory)

Determines whether two AudioCategory instances are equal.

public bool Equals(AudioCategory other)

Parameters

other AudioCategory

AudioCategory to compare with this instance.

Returns

bool

true if the objects are equal or false if they aren't

Equals(object)

Determines whether two AudioCategory instances are equal.

public override bool Equals(object obj)

Parameters

obj object

Object to compare with this instance.

Returns

bool

true if the objects are equal or false if they aren't.

GetHashCode()

Gets the hash code for this instance.

public override int GetHashCode()

Returns

int

Hash code for this object.

Pause()

Pauses all associated sounds.

public void Pause()

Resume()

Resumes all associated paused sounds.

public void Resume()

SetVolume(float)

Set the volume for this AudioCategory.

public void SetVolume(float volume)

Parameters

volume float

The new volume of the category.

Exceptions

ArgumentException

If the volume is less than zero.

Stop(AudioStopOptions)

Stops all associated sounds.

public void Stop(AudioStopOptions options)

Parameters

options AudioStopOptions

ToString()

Returns the name of this AudioCategory

public override string ToString()

Returns

string

Friendly name of the AudioCategory

Operators

operator ==(AudioCategory, AudioCategory)

Determines whether two AudioCategory instances are equal.

public static bool operator ==(AudioCategory first, AudioCategory second)

Parameters

first AudioCategory

First AudioCategory instance to compare.

second AudioCategory

Second AudioCategory instance to compare.

Returns

bool

true if the objects are equal or false if they aren't.

operator !=(AudioCategory, AudioCategory)

Determines whether two AudioCategory instances are not equal.

public static bool operator !=(AudioCategory first, AudioCategory second)

Parameters

first AudioCategory

First AudioCategory instance to compare.

second AudioCategory

Second AudioCategory instance to compare.

Returns

bool

true if the objects are not equal or false if they are.