Table of Contents

Class WaveBank

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

Represents a collection of wave files.

public class WaveBank : IDisposable
Inheritance
WaveBank
Implements
Inherited Members

Constructors

WaveBank(AudioEngine, string)

public WaveBank(AudioEngine audioEngine, string nonStreamingWaveBankFilename)

Parameters

audioEngine AudioEngine

Instance of the AudioEngine to associate this wave bank with.

nonStreamingWaveBankFilename string

Path to the .xwb file to load.

Remarks

This constructor immediately loads all wave data into memory at once.

WaveBank(AudioEngine, string, int, short)

public WaveBank(AudioEngine audioEngine, string streamingWaveBankFilename, int offset, short packetsize)

Parameters

audioEngine AudioEngine

Instance of the AudioEngine to associate this wave bank with.

streamingWaveBankFilename string

Path to the .xwb to stream from.

offset int

DVD sector-aligned offset within the wave bank data file.

packetsize short

Stream packet size, in sectors, to use for each stream. The minimum value is 2.

Remarks

This constructor streams wave data as needed.

Note that packetsize is in sectors, which is 2048 bytes.

AudioEngine.Update() must be called at least once before using data from a streaming wave bank.

Properties

IsDisposed

Is true if the WaveBank has been disposed.

public bool IsDisposed { get; }

Property Value

bool

IsInUse

public bool IsInUse { get; }

Property Value

bool

IsPrepared

public bool IsPrepared { get; }

Property Value

bool

Methods

Dispose()

Disposes the WaveBank.

public void Dispose()

~WaveBank()

protected ~WaveBank()

Events

Disposing

This event is triggered when the WaveBank is disposed.

public event EventHandler<EventArgs> Disposing

Event Type

EventHandler<EventArgs>