public static int PlaySound(ESounds Sound) { string file = Path.Combine(Environment.CurrentDirectory, CSettings.sFolderSounds); switch (Sound) { case ESounds.T440: file = Path.Combine(file, CSettings.sSoundT440); break; default: break; } if (file == String.Empty) { return(-1); } int stream = CSound.Load(file); float length = CSound.GetLength(stream); CSound.Play(stream); CSound.FadeAndStop(stream, 100f, length); return(stream); }
public static void Play() { if (CConfig.BackgroundMusic == EOffOn.TR_CONFIG_ON) { if (_AllFileNames.Count > 0) { if (_CurrentMusicStream != -1) { CSound.Fade(_CurrentMusicStream, CConfig.BackgroundMusicVolume, CSettings.BackgroundMusicFadeTime); CSound.Play(_CurrentMusicStream); _Playing = true; } else { Next(); } } } }
public static void Play() { if (_Playing) { return; } if (CConfig.BackgroundMusic == EOffOn.TR_CONFIG_ON) { if (_AllFileNames.Count > 0) { if (_CurrentMusicStream != -1) { CSound.Fade(_CurrentMusicStream, 100f, CSettings.BackgroundMusicFadeTime); CSound.Play(_CurrentMusicStream); if (_VideoEnabled && _Video != -1) { CVideo.VdResume(_Video); } _Playing = true; } else { Next(); } if (!IsBackgroundFile(_CurrentPlaylistElement)) { _CanSing = true; } else { _CanSing = false; } } } }
public void Play(int soundStream) { CSound.Play(soundStream); }