Add volume to the view model for access

This commit is contained in:
Matt Nadareski
2021-07-01 23:04:20 -07:00
parent 2b0de556a1
commit d2e489e63c
2 changed files with 9 additions and 1 deletions

View File

@@ -4,6 +4,13 @@ namespace RedBookPlayer.GUI
{
public class PlayerViewModel : ReactiveObject
{
private int _volume;
public int Volume
{
get => _volume;
set => this.RaiseAndSetIfChanged(ref _volume, value);
}
private bool _applyDeEmphasis;
public bool ApplyDeEmphasis
{

View File

@@ -274,8 +274,9 @@ namespace RedBookPlayer.Hardware
if(!Initialized || dataContext == null)
return;
dataContext.HiddenTrack = _opticalDisc.TimeOffset > 150;
dataContext.Volume = App.Settings.Volume;
dataContext.ApplyDeEmphasis = _soundOutput.ApplyDeEmphasis;
dataContext.HiddenTrack = _opticalDisc.TimeOffset > 150;
if(_opticalDisc is CompactDisc compactDisc)
{