Detect headphones in desktop situation


#1

Hello, I've seen some posts on detecting headphones on iOS but is there anything similar for the desktop (OSX, Win, Linux)?

I am building a bgm system and would like it to be able to verify that something (hopefully the speakers) is plugged into the audio jack.