When a doomed enemy enters the fog of war, the Doom sound continues playing at their last known location. It lasts until the doom expires, or resumes following when gaining vision over the target again.

Similarly, when a unit was doomed while you had no vision over them, Doom's sound won't play at all even when you gain vision over the target.

The sound should fade in upon gaining vision, and fade out upon losing vision over the target.