XMPlay supports Winamp's IPC_ISPLAYING message, so you can send that to the XMPlay window to check whether it's currently playing (0=stopped, 1=playing, 3=paused).