diff --git a/src/Video/Video.cs b/src/Video/Video.cs index bdcc66e..01dba5b 100644 --- a/src/Video/Video.cs +++ b/src/Video/Video.cs @@ -19,7 +19,17 @@ namespace MoonWorks.Video internal IntPtr Handle; public bool Loop { get; private set; } - public float Volume { get; private set; } + public float Volume { + get => volume; + set + { + volume = value; + if (audioStream != null) + { + audioStream.Volume = value; + } + } + } public float PlaybackSpeed { get; set; } public double FramesPerSecond => fps; private VideoState State = VideoState.Stopped; @@ -43,6 +53,7 @@ namespace MoonWorks.Video private AudioDevice AudioDevice = null; private StreamingSoundTheora audioStream = null; + private float volume = 1.0f; private Stopwatch timer; private double lastTimestamp;