Microphone.GetData Method (Byte , Int32, Int32)
Gets the latest captured audio data from the microphone based on the specified offset and byte count.
Namespace: Microsoft.Xna.Framework.Audio
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)
Syntax
public int GetData (
byte[] buffer,
int offset,
int count
)
Parameters
- buffer
Buffer, in bytes, containing the captured audio data. The audio format must be PCM wave data. - offset
Offset, in bytes, to the starting position of the data. - count
Amount, in bytes, of desired audio data.
Return Value
The buffer size, in bytes, of the audio data.
Exceptions
Exception type | Condition |
---|---|
ArgumentException | The exception thrown when the following arguments are invalid:
|
Remarks
For information about an audio format using XNA Game Studio, see Audio API Developers Guide.
See Also
Concepts
Working with Microphones
Sounds Overview
Audio API Developers Guide
Reference
Microphone Class
Microphone Members
Microsoft.Xna.Framework.Audio Namespace
Platforms
Xbox 360, Windows 7, Windows Vista, Windows XP, Windows Phone 7