Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

How to get GUID of default playback device

loolynloolyn Posts: 2Member
Hi All.

In my application I need to get the GUID and wave ID of the default playback device. For achieving that I am calling DirectSoundEnumerate and assuming that the second device that gets enumerated (the first is default device but with NULL GUID) is the default device, I am using the GUID of that second device to get its wave id. And this works fine for me.
However if leaving my application open, I am changing the default device from Control Panel to be "device2" instead of "device1", the DirectSoundEnumerate isn't working in the above said way, that is the second device enumerated is again "device1" instead of the new default device ("device2"). So the assupmtion that the second enumerated device is the default one starts being wrong and my application works wrong.
The issue gets resolved only if I restart my application.

Does anyone have any idea why this is so?

Thanks in advance.
Sign In or Register to comment.