Class AudioDeviceInfo
- Namespace
- AudioDeviceLib
- Assembly
- AudioDeviceLib.dll
An immutable snapshot of an AudioDevice's identifying information, detached from the live Core Audio COM object. Create one with ToDeviceInfo().
public sealed record AudioDeviceInfo : IEquatable<AudioDeviceInfo>
- Inheritance
-
AudioDeviceInfo
- Implements
- Inherited Members
Remarks
All properties are captured when the snapshot is taken and never change, so an instance is safe to read from any thread, keep, or store - including after the originating AudioDevice has been disposed.
Properties
Id
Endpoint ID, e.g. "{0.0.0.00000000}.{c4aadd95-...}".
public string Id { get; }
Property Value
IsDefault
True if this endpoint is the current default device for its kind (multimedia role).
public bool IsDefault { get; }
Property Value
IsDefaultCommunication
True if this endpoint is the current default communications device for its kind.
public bool IsDefaultCommunication { get; }
Property Value
Kind
Whether this is a playback (render) or recording (capture) endpoint.
public AudioDeviceKind Kind { get; }
Property Value
Name
Friendly name, e.g. "Speakers (Realtek High Definition Audio)".
public string Name { get; }
Property Value
State
Current state of the endpoint.
public DeviceState State { get; }
Property Value
Methods
Equals(AudioDeviceInfo?)
Compares endpoint IDs without regard to case.
public bool Equals(AudioDeviceInfo? other)
Parameters
otherAudioDeviceInfoThe endpoint to compare.
Returns
- bool
Whether both instances identify the same endpoint.
GetHashCode()
Serves as the hash function, derived from Id.
public override int GetHashCode()
Returns
- int
A hash code for this endpoint snapshot.
ToString()
Returns a human-readable description of this endpoint.
public override string ToString()
Returns
- string
A string in the form
Name (Kind), with default-role markers when applicable.