Class MicrophoneFrames
Turns what a microphone records, in whatever format its device gives, into 20 ms voice frames: mixed to mono and resampled to 48 kHz.
Implements
Inherited Members
Namespace: Uniform.Matrix.Audio
Assembly: Uniform.Matrix.Audio.dll
Syntax
public sealed class MicrophoneFrames : IDisposable
Remarks
Frames are raised on the microphone's own thread, as it delivers data.
Constructors
| Edit this page View SourceMicrophoneFrames(IWaveIn)
Follow microphone, whose NAudio.Wave.IWaveIn.WaveFormat is read now, so set it before.
Declaration
public MicrophoneFrames(IWaveIn microphone)
Parameters
| Type | Name | Description |
|---|---|---|
| IWaveIn | microphone |
Methods
| Edit this page View SourceDispose()
Stop following the microphone, and close it.
Declaration
public void Dispose()
Start()
Start recording.
Declaration
public void Start()
Stop()
Stop recording.
Declaration
public void Stop()
Events
| Edit this page View SourceFrameCaptured
Raised with each frame of FrameSamples samples.
Declaration
public event Action<short[]>? FrameCaptured
Event Type
| Type | Description |
|---|---|
| Action<short[]> |