Jump to content
  • Advertisement
Sign in to follow this  

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

This topic is 2676 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!