Partager via


Microphone Members

The following tables list the members exposed by the Microphone type.

Public Fields

Name Description
Public Field Name Returns the friendly name of the microphone.

Public Properties

Name Description
Public Property Static All Returns the collection of all currently-available microphones.
Public Property BufferDuration Gets or sets audio capture buffer duration of the microphone.
Public Property Static Default Returns the default attached microphone.
Public Property IsHeadset Determines if the microphone is a wired headset or a Bluetooth device.
Public Property SampleRate Returns the sample rate at which the microphone is capturing audio data.
Public Property State Returns the recording state of the Microphone object.

Public Methods

Name Description
Public Method Equals (Inherited from Object.)
Public Method GetData Overloaded. Gets the latest recorded data from the microphone.
Public Method GetHashCode (Inherited from Object.)
Public Method GetSampleDuration Returns the duration of audio playback based on the size of the buffer.
Public Method GetSampleSizeInBytes Returns the size of the byte array required to hold the specified duration of audio for this microphone object.
Public Method GetType (Inherited from Object.)
Public Method Start Starts microphone audio capture.
Public Method Stop Stops microphone audio capture.
Public Method ToString (Inherited from Object.)

Protected Methods

Name Description
Protected Method Finalize (Inherited from Object.)
Protected Method MemberwiseClone (Inherited from Object.)

Public Events

Name Description
Public Event BufferReady Event that occurs when the audio capture buffer is ready to processed.

See Also

Reference

Microphone Class
Microsoft.Xna.Framework.Audio Namespace