Sound file problem in MQL4

 
I need help with a sound file problem.

I have an indicator that uses the Playsound command to use alert2.wav. But when an alert is triggered it uses alert.wav instead and all other alerts use alert.wav also.

If I untick Tools/Options/Events Enable then alert2.wav works but all other alerts do not make a sound.

What have I done wrong?

MQL4 Build 950
 
If you have a pop-up alert  followed by a playsound in your code, the sound willl not be played so you only hear the sound for the pop-up alert. You will need to code a small break in between to hear the playsound
 
GumRai:
If you have a pop-up alert  followed by a playsound in your code, the sound willl not be played so you only hear the sound for the pop-up alert. You will need to code a small break in between to hear the playsound
Thanks GumRai I'll give that a try.
 
Keith Watford:
If you have a pop-up alert  followed by a playsound in your code, the sound willl not be played so you only hear the sound for the pop-up alert. You will need to code a small break in between to hear the playsound

Hello Keith,


What would be an example of a "a small break" that I can add into the indicator code.


Thanks

 
agrant2003: What would be an example of a "a small break" that I can add into the indicator code.
#define  MAX_DATETIME    D'3000.12.31 23:59:59'
static datetime delaySound = MAX_DATETIME;
if(TimeCurrent() >= delaySound){ delaySound = MAX_DATETIME; playSound...; }

if(condition){ delaySound = TimeCurrent() + 5; doAlert...; }