SoundDeviceTests PlayMusicAndVideo Method Delta Engine Documentation

Namespace: DeltaEngine.Multimedia.Tests
Assembly: DeltaEngine.Multimedia.Tests (in DeltaEngine.Multimedia.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void PlayMusicAndVideo()
Examples

[Test, CloseAfterFirstFrame]
public void PlayMusicAndVideo()
{
    var device = new MockSoundDevice();
    Assert.IsTrue(device.IsInitialized);
    var music = ContentLoader.Load<Music>("DefaultMusic");
    var video = ContentLoader.Load<Video>("DefaultVideo");
    music.Play();
    video.Play();
    Assert.False(MockMusic.MusicStopCalled);
    Assert.False(MockVideo.VideoStopCalled);
    device.RegisterCurrentMusic(music);
    device.RegisterCurrentVideo(video);
    Assert.IsTrue(device.IsActive);
    Assert.IsTrue(device.IsInitialized);
    device.RapidUpdate();
    device.Dispose();
}
See Also