Namespace: DeltaEngine.Multimedia
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Tests: DeltaEngine.Multimedia.Tests.SoundDeviceTests
22 unit tests call DeltaEngine.Multimedia.Sound.Play
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Remarks
Examples
[Test] public void PlayMusicWhileOtherIsPlaying() { var music1 = ContentLoader.Load<Music>("DefaultMusic"); var music2 = ContentLoader.Load<Music>("DefaultMusicBackwards"); music1.Play(); if (IsMockResolver) Assert.False(MockMusic.MusicStopCalled); music2.Play(); if (IsMockResolver) Assert.True(MockMusic.MusicStopCalled); }
[Test] public void RunWithVideoAndMusic() { var video = ContentLoader.Load<Video>("DefaultVideo"); var music = ContentLoader.Load<Music>("DefaultMusic"); video.Play(); music.Play(); }
[Test] public void TestIfPLayingMusic() { var video = ContentLoader.Load<Video>("DefaultVideo"); video.Play(); Assert.IsTrue(video.IsPlaying()); Assert.AreEqual(3.33333325f, video.DurationInSeconds); Assert.AreEqual(1.0f, video.PositionInSeconds); }
See Also