Namespace: DeltaEngine.Multimedia
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Tests: DeltaEngine.Multimedia.Tests.MusicTests
2 unit tests call DeltaEngine.Multimedia.Music.IsPlaying
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Return Value
Type: BooleanRemarks
Examples
[Test, CloseAfterFirstFrame] public void TestIfPlayingMusic() { var music = ContentLoader.Load<Music>("DefaultMusic"); music.Play(); Assert.IsTrue(music.IsPlaying()); AssertBetween(4.10f, 4.15f, music.DurationInSeconds); AdvanceTimeAndUpdateEntities(0.5f); AssertBetween(0.25f, 5.0f, music.PositionInSeconds); }
[Test, Ignore] public void StartAndStopMusic() { var music = ContentLoader.Load<Music>("DefaultMusic"); AssertBetween(4.10f, 4.15f, music.DurationInSeconds); new MusicPlayedOneSecondTester(music); music.Play(); Assert.IsTrue(music.IsPlaying()); }
See Also