Hi, I’m making my horror game for my engineer’s degree at my university. I want it to make it as immersive as I’m able to, so I wanted to check on the computer of player if he has a headphones on, or not. So I made some code in blueprints and right now I can check how many audio deviceses are on computer. But I wanted to check if it’s actually headphones and I don’t know how? Is there any way to do it?
As far as I’m aware, there isn’t really a way to tell for sure that an audio device is a pair of headphones. To an extent, even your computer doesn’t know that your headphones are headphones. That’s why (at least for Windows 11) you get that popup asking what audio device you just plugged in. So at the very least, any solution would be operating-system-dependent.
While we can’t for certain know if the device is a pair of headphones, we can reasonably guess by checking that we have exactly two channels- the front left and front right.
1 Like