Class AlsaAudioDevices
ALSA devices by name; the default ones route through PipeWire or PulseAudio on desktops, so the system's sound settings apply.
Implements
Inherited Members
Namespace: Uniform.Matrix.Audio
Assembly: Uniform.Matrix.Audio.dll
Syntax
public sealed class AlsaAudioDevices : IAudioDevices
Remarks
The default and pulse devices follow the PULSE_SOURCE and PULSE_SINK environment variables, which choose a PipeWire or PulseAudio device for one process, e.g. a virtual one in tests.
Constructors
| Edit this page View SourceAlsaAudioDevices(string?, string?)
ALSA devices by name; the default ones route through PipeWire or PulseAudio on desktops, so the system's sound settings apply.
Declaration
public AlsaAudioDevices(string? microphone = null, string? speaker = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | microphone | ALSA capture device name; |
| string | speaker | ALSA playback device name; |
Remarks
The default and pulse devices follow the PULSE_SOURCE and PULSE_SINK environment variables, which choose a PipeWire or PulseAudio device for one process, e.g. a virtual one in tests.
Methods
| Edit this page View SourceListMicrophones()
Return ALSA's capture devices.
Declaration
public IReadOnlyList<AudioDevice> ListMicrophones()
Returns
| Type | Description |
|---|---|
| IReadOnlyList<AudioDevice> |
ListSpeakers()
Return ALSA's playback devices.
Declaration
public IReadOnlyList<AudioDevice> ListSpeakers()
Returns
| Type | Description |
|---|---|
| IReadOnlyList<AudioDevice> |
OpenMicrophone()
Open the capture device, asking for the voice format, which ALSA's plug devices convert to.
Declaration
public IWaveIn OpenMicrophone()
Returns
| Type | Description |
|---|---|
| IWaveIn |
OpenSpeaker()
Open the playback device.
Declaration
public IWavePlayer OpenSpeaker()
Returns
| Type | Description |
|---|---|
| IWavePlayer |