Share via


SoundBank Constructor

Initializes a new instance of this class using a sound bank from file.

Syntax

'Declaration
Public Sub New ( _
         audioEngine As AudioEngine, _
         filename As String _
)
public SoundBank (
         AudioEngine audioEngine,
         string filename
)
public:
SoundBank(
         AudioEngine audioEngine,
         String filename
)

Parameters

  • audioEngine
    Type: AudioEngine
    Audio engine that will be associated with this sound bank.
  • filename
    Type: String
    Path to the sound bank file.

Exceptions

Exception type Condition
ArgumentNullException The audioEngine or filename parameter is null.
ArgumentException XACT could not load the data provided. Make sure you are using the correct version of the XACT tool.
InvalidOperationException Unable to create the SoundBank resource.

Requirements

Namespace: Microsoft.Xna.Framework.Audio

Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

See Also

Reference

SoundBank Class
SoundBank Members
Microsoft.Xna.Framework.Audio Namespace

Platforms

Windows Phone