diff --git a/Lib.Audio/Channel.cs b/Lib.Audio/Channel.cs index 712a45a..ad91bde 100644 --- a/Lib.Audio/Channel.cs +++ b/Lib.Audio/Channel.cs @@ -28,7 +28,7 @@ namespace Lib.Audio public IFader Fader { get; } public IKnob Knob { get; } public List Buttons { get; } - public IControllable Controllable { get; private set; } + public IControllable? Controllable { get; private set; } public void AllocateControllable(IControllable controllable) => Controllable = controllable; @@ -42,6 +42,6 @@ namespace Lib.Audio return buttons; } - private void OnFaderPositionChanged(object? sender, float position) => Controllable.SetVolume(position); + private void OnFaderPositionChanged(object? sender, float position) => Controllable?.SetVolume(position); } } \ No newline at end of file diff --git a/Lib.Audio/Controls/Fader.cs b/Lib.Audio/Controls/Fader.cs index cba245a..15aee42 100644 --- a/Lib.Audio/Controls/Fader.cs +++ b/Lib.Audio/Controls/Fader.cs @@ -21,6 +21,6 @@ namespace Lib.Audio.Controls } } - public event EventHandler PositionChanged; + public event EventHandler? PositionChanged; } } \ No newline at end of file diff --git a/Lib.Audio/Controls/Interfaces/IFader.cs b/Lib.Audio/Controls/Interfaces/IFader.cs index 475bb50..b14d440 100644 --- a/Lib.Audio/Controls/Interfaces/IFader.cs +++ b/Lib.Audio/Controls/Interfaces/IFader.cs @@ -10,6 +10,6 @@ namespace Lib.Audio.Controls.Interfaces { float Position { get; } //TODO: float or double? - event EventHandler PositionChanged; + event EventHandler? PositionChanged; } } \ No newline at end of file diff --git a/Lib.Audio/Interfaces/IChannel.cs b/Lib.Audio/Interfaces/IChannel.cs index 80b712a..789e8d3 100644 --- a/Lib.Audio/Interfaces/IChannel.cs +++ b/Lib.Audio/Interfaces/IChannel.cs @@ -14,7 +14,7 @@ namespace Lib.Audio.Interfaces IKnob Knob { get; } List Buttons { get; } - IControllable Controllable { get; } + IControllable? Controllable { get; } void AllocateControllable(IControllable controllable); }