Class WasapiPlaybackCapability
Describes what Init(IWaveProvider) would do for a particular source format, as returned by GetPlaybackCapability(WaveFormat). Lets you validate a chosen configuration before opening the audio stream.
public sealed record WasapiPlaybackCapability : IEquatable<WasapiPlaybackCapability>
- Inheritance
-
WasapiPlaybackCapability
- Implements
- Inherited Members
Constructors
WasapiPlaybackCapability(bool, AudioClientShareMode, bool, WaveFormat, IReadOnlyList<string>, int, string)
Describes what Init(IWaveProvider) would do for a particular source format, as returned by GetPlaybackCapability(WaveFormat). Lets you validate a chosen configuration before opening the audio stream.
public WasapiPlaybackCapability(bool Supported, AudioClientShareMode ShareMode, bool LowLatencyActive, WaveFormat OutputFormat, IReadOnlyList<string> Conversions, int LatencyMilliseconds, string Reason)
Parameters
SupportedboolWhether playback is possible at all. False only in exclusive mode when the device cannot accept the source's sample rate (which would require resampling); shared mode is always supported.
ShareModeAudioClientShareModeThe share mode that would be used.
LowLatencyActiveboolWhether the IAudioClient3 low-latency path would actually engage. Only ever true when low latency was requested and the source can be adapted to the engine mix format without resampling.
OutputFormatWaveFormatThe format the device would receive (after any conversion).
ConversionsIReadOnlyList<string>Human-readable descriptions of the latency-free conversions that would be inserted (bit depth, channels), or empty when the source is used as-is. Note that in standard shared mode the audio engine performs conversion (including sample-rate) itself, so this list is empty there.
LatencyMillisecondsintThe latency that would be used, in milliseconds.
ReasonstringWhen
Supportedis false, why playback is not possible. When low latency was requested butLowLatencyActiveis false, why it could not be honoured. Null otherwise.
Properties
Conversions
Human-readable descriptions of the latency-free conversions that would be inserted (bit depth, channels), or empty when the source is used as-is. Note that in standard shared mode the audio engine performs conversion (including sample-rate) itself, so this list is empty there.
public IReadOnlyList<string> Conversions { get; init; }
Property Value
LatencyMilliseconds
The latency that would be used, in milliseconds.
public int LatencyMilliseconds { get; init; }
Property Value
LowLatencyActive
Whether the IAudioClient3 low-latency path would actually engage. Only ever true when low latency was requested and the source can be adapted to the engine mix format without resampling.
public bool LowLatencyActive { get; init; }
Property Value
OutputFormat
The format the device would receive (after any conversion).
public WaveFormat OutputFormat { get; init; }
Property Value
Reason
When Supported is false, why playback is not possible. When low latency was
requested but LowLatencyActive is false, why it could not be honoured. Null
otherwise.
public string Reason { get; init; }
Property Value
ShareMode
The share mode that would be used.
public AudioClientShareMode ShareMode { get; init; }
Property Value
Supported
Whether playback is possible at all. False only in exclusive mode when the device cannot accept the source's sample rate (which would require resampling); shared mode is always supported.
public bool Supported { get; init; }