pull default DirectSound devices from system like WMME does
PA/DirectSound currently uses "Primary Sound Capture Driver" and "Primary Sound Driver" as the default input and output devices respectively. These are the devices with NULL GUIDs and are presumably also the devices configured in the system control panel.
Code has been added to PA/WMME that retrieves the preferred devices from the system. We could use the same mechanism in DirectSound.
We can retrieve default devices using the DRVM_MAPPER_PREFERRED_GET functions used in the wmme api these wave device ids can be aligned with the directsound devices either by retrieving the system interface device name using DRV_QUERYDEVICEINTERFACE or by using the wave device id retrieved in KsPropertySetEnumerateCallback.
Code has been added to PA/WMME that retrieves the preferred devices from the system. We could use the same mechanism in DirectSound.
We can retrieve default devices using the DRVM_MAPPER_PREFERRED_GET functions used in the wmme api these wave device ids can be aligned with the directsound devices either by retrieving the system interface device name using DRV_QUERYDEVICEINTERFACE or by using the wave device id retrieved in KsPropertySetEnumerateCallback.
Leave a comment