This small program runs in the background and checks permanant if a headset is connected to the PocketPC. When the headset is removed accidentally or intenional from the PocketPC, the volume will be set to a default value. This should prevent, that you forget to change the volume or to stop the music playing and so your music won’t “annoy” other people around you.

http://forum.xda-developers.com/showthread.php?t=480010