Upon quitting Totem, I heard a ping. This came from xchat-gnome (via the sound-notification plugin). It turns out gnome_sound_play was being used to play the sound, which defaults to the ESD backend:

gnome_sound_play("../../data/message.wav");

ESD has been superseded by PulseAudio in most major distributions. I would prefer moving to a GStreamer-based backend, so I rewrote the code to use GStreamer. However, the ping still didn’t work while I was playing music through Totem.

xchat-gnome Sound Notification

Digging into this further, it turns out GStreamer supports multiple profiles for audiosinks, and gstreamer-properties only configures the default audiosink. In the end, I configured all audiosink entries to pulseaudio.

Abracadabra! Magic with GStreamer. The ping now works as expected and on time.

Reference: GNOME Bug #401829 – gstreamer-properties change all types of sinks (musicaudiosink) when changing audiosink