falconindy/ponymix — pull request #24 by evaryont (2014-01-16 17:57:24+00:00)
Title: Support checking for headphones

Codifying #23. This checks the active port's jack, to see if it's 'available'. Not all devices support that, which will return PA_PORT_AVAILABLE_UNKNOWN. Those are presented as not having headphones plugged in.

Not sure if this really matches your own style, it's been a long time since I programmed C++.