Sign in to follow this  
SamLozano

Questionlooking for info on how to identify a combined audio and game controller device

Recommended Posts

SamLozano    100
Let me preface this by saying that I have 10+ years experience in C++ but very minimal experience in DirectX or audio app development in Windows. So consider me a newbie to the Windows API stuff but not to software dev in general :)


I've got a Plantronics headset device that (when plugged into windows) identifies itself as three separate devices - a speaker, a mic, and a game controller with a single button. I've written code to manage all three devices - audio devices I'm handling through WASAPI and the joystick through DirectInput. However, this approach is lacking in my opinion - I'm still treating the single device as separate logical entities. So that when it comes time to display this device on my own GUI, it shows up as two different devices.


The problem is that I don't have enough expertise to figure out how to logically associate the audio and the joystick portions via a common ID. The IMMDevice interface deals with endpoint IDs and InstanceIDs while DirectInput is using instance and product GUIDs to identify the game controller. These separate IDs don't match up, hence my program can't tell that they're part of the same physical device.


For instance, I connect the device and my program will show that the speaker and mic have InstanceID = YYYY. The joystick part will enumerate and give me a guidInstance = XXXX. From looking at both MMDevice and DirectInput APIs, I don't know of any way to know in my program that the joystick with guidInstance XXXX is actually physically a part of the mic/speaker with InstanceID=YYYY. Can this even be done? Maybe in WMI?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this