DynamicSoundEffectInstance.BufferNeeded Event
Event that occurs when the number of audio capture buffers awaiting playback is less than or equal to two.
Namespace: Microsoft.Xna.Framework.Audio
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)
Syntax
public event EventHandler<EventArgs> BufferNeeded
Remarks
Occurs when PendingBufferCount <= 2.
The BufferNeeded event is raised in the following situations:
During DynamicSoundEffectInstance playback when the pending buffer count is less then or equal to 2.
Every time the DynamicSoundEffectInstance instance completes playing a buffer, and updates the pending buffer count.
When a DynamicSoundEffectInstance instance transitions from the stopped to playing state, and the pending buffer count is less than or equal to 2.
Silverlight applications must ensure that FrameworkDispatcher.Update is called regularly in order for "fire and forget" sounds to work correctly. BufferNeeded throws an InvalidOperationException if FrameworkDispatcher.Update has not been called at least once before making this call. For more information, see Enable XNA Framework Events in Windows Phone Applications.
See Also
DynamicSoundEffectInstance Class
DynamicSoundEffectInstance Members
Microsoft.Xna.Framework.Audio Namespace
Platforms
Xbox 360, Windows 7, Windows Vista, Windows XP, Windows Phone