Detect if speakers are plugged in?
Is there any way to detect if computer has speakers plugged in? It would be nice if that would be possible with J开发者_StackOverflowavaScript, but if not, then my best bet would be Java.
But, yeah, I haven't worked with Java at all, any useful resources on this?
Thanks in advance!
EDIT:
So the answer for this is "impossible" and I shouldn't even bother looking for a solution?
Every piece of software I've seen that needs to determine such a thing provides a way for the user to play a "test sound" and give the application some appropriate feedback. That seems to be the most practical solution.
The computer itself is not, in general, aware of this.
Some audio drivers are, but they don't expose the information.
精彩评论