Foobar2000:Components 0.9/Pause on Lock (extended) (foo lock ex)
Pause playing on workstation lock. Optimized for use with Windows XP/2003.
foo_lock_ex, in comparison with foo_lock, uses the new XP/2003 API, which allow to minimize CPU usage and faster react to system events.
To activate plugin use menu Playback -> Pause on lock.