DirectX

Moderators: Sephiroth
Number of threads: 130
Number of posts: 207

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
How to get GUID of default playback device Posted by loolyn on 18 Aug 2011 at 12:09 AM
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.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.