Namespace: DeltaEngine.Multimedia
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Tests: DeltaEngine.Multimedia.Tests.SoundTests
1 unit tests call DeltaEngine.Multimedia.Sound.StopInstance(DeltaEngine.Multimedia.SoundInstance)
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Parameters
- instanceToStop
- Type: DeltaEngine.Multimedia SoundInstance
Remarks
Examples
[Test] public void PlayAndStopInstance() { var sound = ContentLoader.Load<Sound>("DefaultSound"); var instance = sound.CreateSoundInstance(); Assert.IsFalse(sound.IsAnyInstancePlaying); Assert.AreEqual(0f, instance.PositionInSeconds); instance.Play(); Assert.IsTrue(sound.IsAnyInstancePlaying); WaitUntilSoundStateIsUpdated(); Assert.Greater(instance.PositionInSeconds, 0f); sound.StopAll(); WaitUntilSoundStateIsUpdated(); Assert.AreEqual(0f, instance.PositionInSeconds); Assert.IsFalse(sound.IsAnyInstancePlaying); }
See Also