private void DelayedPlayback(SoundPlaySetting soundPlaySettings)
        {
            Close();

            _command = "open \"" + _rootDirectory + soundPlaySettings.FileName + "\" type mpegvideo alias MediaFile";
            mciSendString(_command, null, 0, IntPtr.Zero);

            _command = "play MediaFile";

            mciSendString(_command, null, 0, IntPtr.Zero);
        }
 public void Play(SoundPlaySetting soundPlaySettings)
 {
     if(soundPlaySettings.Delay <= 0)
     {
         DelayedPlayback(soundPlaySettings);
     }
     else
     {
         _playQueue.Add(new PlayQueueItem
         {
             SoundPlaySetting = soundPlaySettings,
             StartPlayingAfter = DateTime.Now.AddMilliseconds(soundPlaySettings.Delay).Ticks
         });
     }
 }