public void stopAllEffects()
        {
            lock (effectTasks) {
                for (int i = 0; i < effectTasks.Count; i++)
                {
                    TSoundTask task = effectTasks[i];
                    task.stop();
                }

                effectTasks.Clear();
            }
        }
        public void stopAllVoices()
        {
            lock (voiceTasks) {
                for (int i = 0; i < voiceTasks.Count; i++)
                {
                    TSoundTask task = voiceTasks[i];
                    task.stop();
                }

                voiceTasks.Clear();
            }
        }
 public void stopVoice(string fileName)
 {
     lock (voiceTasks) {
         for (int i = 0; i < voiceTasks.Count; i++)
         {
             TSoundTask task = voiceTasks[i];
             if (Path.GetFileName(task.filePath) == fileName)
             {
                 voiceTasks.Remove(task);
                 task.stop();
             }
         }
     }
 }
 public void stopEffect(string fileName)
 {
     lock (effectTasks) {
         for (int i = 0; i < effectTasks.Count; i++)
         {
             TSoundTask task = effectTasks[i];
             if (Path.GetFileName(task.filePath) == fileName)
             {
                 effectTasks.Remove(task);
                 task.stop();
             }
         }
     }
 }