How to enumerate audio endpoint (IMMDevice) properties on your system


This blog post has moved to https://matthewvaneerde.wordpress.com/2011/06/13/how-to-enumerate-audio-endpoint-immdevice-properties-on-your-system/

Comments (12)
  1. Matthew Copeland says:

    Hi,

    Writing some code to identify paired capture/render devices, ie a headset.

    My big assumption is the following value

    {b3f8fa53-0004-438e-9003-51a46e139bfc},2

    is a constant which always maps to the device ID as reported by WMI.

    Is my assumption correct?

  2. Matthew Copeland says:

    Forgot to also ask if this value is the same in XP and Vista?

  3. That property is not publically defined, and you should not rely on it.

    You can identify whether render and capture devices are on the same hardware by doing the device topology "connector dance" and the PKEY_Device_InstanceId property.  For example, see:

    blogs.msdn.com/…/sample-find-out-if-your-default-playback-and-capture-devices-are-on-the-same-hardware.aspx

  4. IMMDevice properties were introduced in Vista; XP is a very different beast.

  5. parallel says:

    how can I enable a disabled  endpoint device ,are there any api I can use?

  6. Only the user can enable or disable audio endpoints, and that only via the Sound control panel.

  7. Kevin Choi says:

    Hello,

    I am trying to write a program to set audio properties of endpoint devices. I've seen that there is EndpointDeviceVolume API out for controlling the volume, but I want to see if it is possible to programmatically set properties like Enhancements. Is there a way to enumerate the properties and get/set values using IMMDevice?

    Thanks

    Kevin

  8. Each endpoint has two property stores; the "endpoint property store" displayed above, and the "effects property store."  The endpoint property store is exposed to applications, but the effects property store is limited to:

    1) the audio driver

    2) the audio engine

    3) the Sound control panel.

    So only the user can view / change settings in the effects property store, and that only through the Sound control panel.

    I'm interested in why your application needs to know about the effects property store.  Can you share some details on your application?  You can post it at the Windows Pro Audio forum

    social.msdn.microsoft.com/…/threads

    Or you can email me directly: mateer at microsoft dot com

  9. Amit Arya says:

    I am a newbie in c#..Please dont get annoyed by my question if its kinda silly one..

    I need to see the disabled playback and recording devices by c# code and want to enable  or disable it as per my need.

    How can I approach..??

    I made a code using DirectX.DirectSound API but it is limited to enumerate the devices which are only enabled and i am not able see the disabled devices present. And I don't think there is any method of disabling or enabling the devices.

    I'll be very thankful to u for the help.

  10. Amit Arya says:

    And please also suggest me how can I do this with using other API's if possible.

  11. How audio WDM driver know that PKEY_AudioEndpoint_Disable_SysFx be set to 1 says:

    Hi Maurits,

    May I ask a question?

    How does WIN8 offload audio driver know that app have set PKEY_AudioEndpoint_Disable_SysFx to 1, is there be a notify function or API I can use in WDM driver?

    Thanks much…

  12. That's a good question for the wdmaudiodev email list.

    I believe the answer has three parts:

    1. There are two different property stores for each endpoint. This blog post deals with the "endpoint property store", which the driver can seed with EPn directives. Apps generally have read-only access to this. There is also an "effects property store", which the driver can seed with FXn directives. Apps cannot access this at all; only APOs and the Sound control panel can access this.

    2. A Windows 8.0 offload driver will receive IOCTLs KSPROPSETID_AudioEngine/KSPROPERTY_AUDIOENGINE_LFXENABLE = 0 and _GFXENABLE = 0 if effects ate disabled. If there are finer-grained effects settings, the custom Sound control panel property page provider must inform the driver out of band, since the offload path has no APO.

    3. A Windows 8.1 driver should use KSPROPSETID_AudioSignalProcessing to advertise processing modes available on the host pin and offload pin. If the offload pin does not support _RAW mode, disabling effects will also disable offload.

Comments are closed.

Skip to main content