SoundDeviceTests ChangeMusicVolume 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 ChangeMusicVolume()
Examples

[Test, CloseAfterFirstFrame]
public void ChangeMusicVolume()
{
    var device = new MockSoundDevice();
    float defaultMusicVolume = Settings.Current.MusicVolume;
    Assert.IsTrue(device.IsInitialized);
    try
    {
        device.MusicVolume = 1.0f;
        Assert.AreEqual(1.0f, device.MusicVolume);
    }
    finally
    {
        device.MusicVolume = defaultMusicVolume;
    }
    device.RapidUpdate();
    device.Dispose();
}
See Also