SoundDevice MusicVolume Property Delta Engine Documentation

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

public float MusicVolume { get; set; }

Property Value

Type: Single
Remarks

Tests: DeltaEngine.Multimedia.Tests.SoundDeviceTests
Examples

1 unit tests call DeltaEngine.Multimedia.SoundDevice.MusicVolume
[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