public void SetSound(string soundFile, bool loop, bool streaming) { RemoveSound(); if (File.Exists(soundFile) == false) { throw new FileNotFoundException("The sound file at : " + soundFile + " does not exist."); } lock (SoundManager3D.Instance.LockSync) { if (streaming) { Console.WriteLine("Streaming sound: " + soundFile); _sound = FreeSL.fslStreamSound(soundFile); } else { _sound = FreeSL.fslLoadSound(soundFile); } _streaming = streaming; if (!streaming) { LoopSound(loop); } } _loop = loop; _soundFile = soundFile; _withSound = true; }
public void SetSound(string soundFile, bool loop, bool streaming) { RemoveSound(); if (System.IO.File.Exists(soundFile) == false) { throw new System.IO.FileNotFoundException("The sound file at : " + soundFile + " does not exist."); } if (streaming) { _sound = FreeSL.fslStreamSound(soundFile); } else { _sound = FreeSL.fslLoadSound(soundFile); } LoopSound(loop); _withSound = true; }