Play sound and use a timer to make sure it is not played twice

This code ensure that a sound is not played on top of itself
It uses a variable: endSoundTime which is set the computer time when the time will be finished