public void Resume() { lock ( effect ) { effect.Resume(); } }
/// <summary> /// Used to resume the currently playing song. /// </summary> public void resume() { if (dynamicSound == null) { return; } dynamicSound.Resume(); }
public void Resume() { lock (ControlLock) { _State = SoundState.Playing; Inst?.Resume(); } }
/// <summary> /// Used to resume the currently playing song. /// </summary> public override void resumeSong() { if (dynamicSound == null) { return; } dynamicSound.Resume(); }
public void Resume() { if (MediaState != MediaState.Paused) { return; } MediaState = MediaState.Playing; effect.Resume(); }
public void Playback() { using (var instance = new DynamicSoundEffectInstance(48000, AudioChannels.Mono)) { // Initially, the playback is stopped Assert.AreEqual(SoundState.Stopped, instance.State); // Submitting a buffer will not change the state instance.SubmitBuffer(GenerateSineWave(440, 48000, 1, 0.5f)); Assert.AreEqual(SoundState.Stopped, instance.State); // Start playing instance.Play(); Assert.AreEqual(SoundState.Playing, instance.State); // While still playing, pause the playback SleepWhileDispatching(300); instance.Pause(); Assert.AreEqual(SoundState.Paused, instance.State); // Let it continue and run out of buffers instance.Resume(); SleepWhileDispatching(300); Assert.AreEqual(0, instance.PendingBufferCount); Assert.AreEqual(SoundState.Playing, instance.State); // Submit a buffer and the playback should continue instance.SubmitBuffer(GenerateSineWave(466, 48000, 1, 1.0f)); Assert.AreEqual(SoundState.Playing, instance.State); SleepWhileDispatching(500); // Stop immediately Assert.AreEqual(SoundState.Playing, instance.State); instance.Stop(); SleepWhileDispatching(10); // XNA does not stop it until FrameworkDispatcher.Update is called Assert.AreEqual(SoundState.Stopped, instance.State); // And then resume instance.Resume(); Assert.AreEqual(SoundState.Playing, instance.State); } }
public void Playback_Exceptions() { var instance = new DynamicSoundEffectInstance(16000, AudioChannels.Mono); instance.Dispose(); Assert.Throws <ObjectDisposedException>(() => { instance.Play(); }); Assert.Throws <ObjectDisposedException>(() => { instance.Pause(); }); Assert.Throws <ObjectDisposedException>(() => { instance.Resume(); }); Assert.Throws <ObjectDisposedException>(() => { instance.Stop(); }); Assert.Throws <ObjectDisposedException>(() => { instance.Stop(false); }); Assert.Throws <ObjectDisposedException>(() => { instance.SubmitBuffer(new byte[0]); }); }
public void Resume() { checkDisposed(); // Check the player state before attempting anything. if (State != MediaState.Paused) { return; } // Update the player state. State = MediaState.Playing; // Unpause timer, audio. timer.Start(); if (audioStream != null) { audioStream.Resume(); } }
internal void Resume() { soundStream.Resume(); timer.Start(); }
internal void Resume() { soundStream.Resume(); }
public void Resume() { _instance.Resume(); _instance.Volume = _volume; _iSaidStop = false; }
public override void Resume() => instance.Resume();
/// <summary> /// Resumes playback. /// </summary> public void Resume() { sfx.Resume(); }
public void Resume() { lock (sound) { sound.Resume(); } }
public override void Resume() { m_SoundInstance.Resume(); }
/// <summary>Used to resume the currently playing song.</summary> public void resume() { dynamicSound?.Resume(); }