public void PlayVideo() { if (video != null) { soundEngine.PauseSound(video, false); } }
public void PlayMusicThen(MusicInfo mi, Action then) { if (mi == null || !mi.Exists) { return; } onMusicComplete = then; if (mi == currentMusic && music != null) { soundEngine.PauseSound(music, false); MusicPlaying = true; return; } StopMusic(); Func <ISoundFormat, ISound> stream = soundFormat => soundEngine.Play2DStream(soundFormat.GetPCMInputStream(), soundFormat.Channels, soundFormat.SampleBits, soundFormat.SampleRate, false, true, Vector3.Zero, MusicVolume); music = LoadSound(mi.Filename, stream); if (music == null) { onMusicComplete = null; return; } currentMusic = mi; MusicPlaying = true; }