SoundTests PlayAndStopEvents 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 PlayAndStopEvents()
Examples

[Test]
public void PlayAndStopEvents()
{
    var sound = ContentLoader.Load<Sound>("DefaultSound");
    sound.OnPlay += instance => Assert.True(sound.IsAnyInstancePlaying);
    sound.OnStop += instance => Assert.False(sound.IsAnyInstancePlaying);
    sound.Play();
    sound.StopAll();
    WaitUntilSoundStateIsUpdated();
}
See Also