public virtual void PlayPauseStop() { _jackOut.Play(); Assert.AreEqual(PlaybackState.Playing, _jackOut.PlaybackState); _jackOut.Pause(); Assert.AreEqual(PlaybackState.Paused, _jackOut.PlaybackState); _jackOut.Play(); Assert.AreEqual(PlaybackState.Playing, _jackOut.PlaybackState); _jackOut.Stop(); Assert.AreEqual(PlaybackState.Stopped, _jackOut.PlaybackState); }
/// <summary> /// Run the emulation loop while EmulationON is true. /// </summary> public static void EMUClock() { while (EmulationON) { if (!EmulationPaused) { CPUClock(); } else { EmuStatus = EmulationStatus.PAUSED; if (AudioOut != null) { AudioOut.Pause(); } if (request_save_sram) { EmuStatus = EmulationStatus.SAVINGSRAM; request_save_sram = false; SaveSRAM(); EmulationPaused = false; } if (request_hardReset) { EmuStatus = EmulationStatus.HARDRESET; request_hardReset = false; hardReset(); EmulationPaused = false; } if (request_softReset) { EmuStatus = EmulationStatus.SOFTRESET; request_softReset = false; softReset(); EmulationPaused = false; } if (request_state_save) { EmuStatus = EmulationStatus.SAVINGSTATE; request_state_save = false; SaveStateAs(STATEFileName); EmulationPaused = false; } if (request_state_load) { EmuStatus = EmulationStatus.LOADINGSTATE; request_state_load = false; LoadStateAs(STATEFileName); EmulationPaused = false; } if (request_snapshot) { EmuStatus = EmulationStatus.SAVINGSNAP; request_snapshot = false; videoOut.TakeSnapshot(SNAPSFolder, SNAPSFileName, SNAPSFormat, SNAPSReplace); EmulationPaused = false; } Thread.Sleep(100); } } // Shutdown ShutDown(); }