filoe / cscore

An advanced audio library, written in C#. Provides tons of features. From playing/recording audio to decoding/encoding audio streams/files to processing audio data in realtime (e.g. applying custom effects during playback, create visualizations,...). The possibilities are nearly unlimited.
Other
2.14k stars 450 forks source link

PropertyStore constains not all keys #480

Open steam3d opened 1 year ago

steam3d commented 1 year ago

When I get Properties from console like this:

$device = Get-CimInstance -ClassName Win32_PnPEntity | Out-GridView -Title 'Select Device' -OutputMode Single
$properties = Invoke-CimMethod -MethodName GetDeviceProperties -InputObject $device | Select-Object -ExpandProperty DeviceProperties

I have much more properties of audio endpoint. For example: image

When I try to get the same using cscore:

using (var enumerator = new MMDeviceEnumerator())
{
    var audioEndpoints = enumerator.EnumAudioEndpoints(DataFlow.Render, DeviceState.Active);
    foreach (var audioEnd in audioEndpoints)
    {
        Console.WriteLine(audioEnd.FriendlyName);
        Console.WriteLine(audioEnd.DeviceID);
        foreach (var property in audioEnd.PropertyStore)
        {
            Console.WriteLine($"     {property.Key} = {property.Value}");
        }

        Console.WriteLine();
    }   
}

I do not get the key: SWD\MMDEVAPI\{0.0.0.00000000}.{31BD64A4-4278-4C62-A9A0-021534C7A2D0} {83DA6326-97A6-4088-9453-A1923F573B29} 102 DEVPKEY_Device_LastArrivalDate 16 30.03.2023 15:56:50

And I do not get a lot of other keys