|
|
@ -170,12 +170,17 @@ namespace NAudio.CoreAudioApi |
|
|
|
{ |
|
|
|
get |
|
|
|
{ |
|
|
|
if (propertyStore == null) |
|
|
|
GetPropertyInformation(); |
|
|
|
EnsurePropertyStoreExists(); |
|
|
|
return propertyStore; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private void EnsurePropertyStoreExists() |
|
|
|
{ |
|
|
|
if (propertyStore == null) |
|
|
|
GetPropertyInformation(); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Friendly name for the endpoint
|
|
|
|
/// </summary>
|
|
|
@ -183,16 +188,11 @@ namespace NAudio.CoreAudioApi |
|
|
|
{ |
|
|
|
get |
|
|
|
{ |
|
|
|
if (propertyStore == null) |
|
|
|
{ |
|
|
|
GetPropertyInformation(); |
|
|
|
} |
|
|
|
if (propertyStore.Contains(PropertyKeys.PKEY_Device_FriendlyName)) |
|
|
|
{ |
|
|
|
return (string)propertyStore[PropertyKeys.PKEY_Device_FriendlyName].Value; |
|
|
|
} |
|
|
|
else |
|
|
|
return "Unknown"; |
|
|
|
EnsurePropertyStoreExists(); |
|
|
|
|
|
|
|
return propertyStore.TryGetValue<string>(PropertyKeys.PKEY_Device_FriendlyName, out var value) |
|
|
|
? value |
|
|
|
: "Unknown"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -203,18 +203,11 @@ namespace NAudio.CoreAudioApi |
|
|
|
{ |
|
|
|
get |
|
|
|
{ |
|
|
|
if (propertyStore == null) |
|
|
|
{ |
|
|
|
GetPropertyInformation(); |
|
|
|
} |
|
|
|
if (propertyStore.Contains(PropertyKeys.PKEY_DeviceInterface_FriendlyName)) |
|
|
|
{ |
|
|
|
return (string)propertyStore[PropertyKeys.PKEY_DeviceInterface_FriendlyName].Value; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
return "Unknown"; |
|
|
|
} |
|
|
|
EnsurePropertyStoreExists(); |
|
|
|
|
|
|
|
return propertyStore.TryGetValue<string>(PropertyKeys.PKEY_DeviceInterface_FriendlyName, out var value) |
|
|
|
? value |
|
|
|
: "Unknown"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -225,16 +218,11 @@ namespace NAudio.CoreAudioApi |
|
|
|
{ |
|
|
|
get |
|
|
|
{ |
|
|
|
if (propertyStore == null) |
|
|
|
{ |
|
|
|
GetPropertyInformation(); |
|
|
|
} |
|
|
|
if (propertyStore.Contains(PropertyKeys.PKEY_Device_IconPath)) |
|
|
|
{ |
|
|
|
return (string)propertyStore[PropertyKeys.PKEY_Device_IconPath].Value; |
|
|
|
} |
|
|
|
|
|
|
|
return "Unknown"; |
|
|
|
EnsurePropertyStoreExists(); |
|
|
|
|
|
|
|
return propertyStore.TryGetValue<string>(PropertyKeys.PKEY_Device_IconPath, out var value) |
|
|
|
? value |
|
|
|
: "Unknown"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -245,16 +233,11 @@ namespace NAudio.CoreAudioApi |
|
|
|
{ |
|
|
|
get |
|
|
|
{ |
|
|
|
if (propertyStore == null) |
|
|
|
{ |
|
|
|
GetPropertyInformation(); |
|
|
|
} |
|
|
|
if (propertyStore.Contains(PropertyKeys.PKEY_Device_InstanceId)) |
|
|
|
{ |
|
|
|
return (string)propertyStore[PropertyKeys.PKEY_Device_InstanceId].Value; |
|
|
|
} |
|
|
|
|
|
|
|
return "Unknown"; |
|
|
|
EnsurePropertyStoreExists(); |
|
|
|
|
|
|
|
return propertyStore.TryGetValue<string>(PropertyKeys.PKEY_Device_InstanceId, out var value) |
|
|
|
? value |
|
|
|
: "Unknown"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|