AudioEngine Constructor (String, TimeSpan, Guid)
Initializes a new instance of this class, using a settings file, a specific audio renderer, and a specific speaker configuration.
Namespace: Microsoft.Xna.Framework.Audio
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)
Syntax
public AudioEngine (
string settingsFile,
TimeSpan lookAheadTime,
Guid rendererId
)
Parameters
- settingsFile
Path to a global settings file. - lookAheadTime
Interactive audio and branch event look-ahead time, in milliseconds. - rendererId
ID that specifies the audio renderer to use.
Exceptions
Exception type | Condition |
---|---|
ArgumentNullException | The settingsFile parameter is null. |
ArgumentException | XACT could not load the data provided. Make sure you are using the correct version of the XACT tool. |
InvalidOperationException | The engine could not be created. |
Remarks
The lookAheadTime parameter specifies how far ahead the audio engine will look when determining when to transition to another sound. For sounds linked to Play events that use a wave variation list, this parameter should be set to greater than 250 milliseconds. Doing so should give the audio engine enough time to prepare streamed data before it is needed for the loop iteration.
See Also
Reference
AudioEngine Class
AudioEngine Members
Microsoft.Xna.Framework.Audio Namespace
Platforms
Xbox 360, Windows XP SP2, Windows Vista