When headphone is remove from jack on PC.

When headphone is remove from jack on PC, all audio seems like stops. is there anyway to check if headphone is remove so I can show pause window?

no way to check that only the system level and sound drivers know about it.

readon it stops is that

  1. there is no output device anymore
  2. the output device is switched through the driver cause the headphones force it into a different mode (5.1 onboard cards have that to offer stereo on the headphones for example)