Microphone.BufferDuration Property
XNA Game Studio 4.0
Gets or sets audio capture buffer duration of the microphone.
Namespace: Microsoft.Xna.Framework.Audio
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)
| Exception type | Condition |
|---|---|
| ArgumentOutOfRangeException | The exception that is thrown if BufferDuration is less than 100 milliseconds or is greater than 1000 milliseconds. |
| ArgumentOutOfRangeException | The exception that is thrown if BufferDuration is not aligned by 10 milliseconds. |
The duration of the capture buffer must be between 100ms and 1000ms. Additionally, the capture buffer must be 10ms aligned (BufferDuration % 10 == 0).
Silverlight applications must ensure that FrameworkDispatcher.Update is called regularly in order for "fire and forget" sounds to work correctly. BufferDuration 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.