do expensive 'next message number' calculation before playing sounds (issue #4955)