Added function to test if it's time for the sounds to play.