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 Fade(int soundStream, int targetVolume, float duration, EStreamAction afterFadeAction = EStreamAction.Nothing) { CSound.Fade(soundStream, targetVolume, duration, afterFadeAction); }