title | description | requireMSLicense |
---|---|---|
How to work with Microphones |
This topic provides basic information about microphone usage in games. |
true |
The Microphone API is only implemented on OpenAL based platforms at this time. This includes iOS/Android and Desktop projects using DesktopGL.
The MonoGame Microphone API has the following functionality:
- Captures the audio stream from a microphone.
- Submits and controls a stream of audio buffers for playback using the DynamicSoundEffectInstance object.
- Plays back audio.
The Microphone API behaves like a simple audio recorder with a configurable capture buffer. It has been designed with the following development process workflow:
- Select the microphone connected to the device.
- Configure the microphone's capture buffer size.
- Control the recording using standard transport controls (Start and Stop).
- Retrieve the captured audio using the GetData method.
Also, you can use the BufferReady event handler of the Microphone class if you want to be notified when the audio capture buffer is ready to be processed.
-
Provides overviews about audio technology, and presents predefined scenarios to demonstrate how to use audio.
-
DynamicSoundEffectInstance
Provides properties, methods, and events for play back of the audio buffer.
-
Microphone
Provides properties, methods, and fields and events for capturing audio data with microphones.