|
|
|
@ -13,11 +13,15 @@ namespace Lib.Audio |
|
|
|
{ |
|
|
|
{ |
|
|
|
public class Channel : IChannel |
|
|
|
public class Channel : IChannel |
|
|
|
{ |
|
|
|
{ |
|
|
|
public Channel(IDeviceButtonConfiguration buttonConfiguration, |
|
|
|
private readonly uint _channelNumber; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Channel(uint channelNumber, |
|
|
|
|
|
|
|
IDeviceButtonConfiguration buttonConfiguration, |
|
|
|
IFaderFactory faderFactory, |
|
|
|
IFaderFactory faderFactory, |
|
|
|
IKnobFactory knobFactory, |
|
|
|
IKnobFactory knobFactory, |
|
|
|
IButtonFactory buttonFactory) |
|
|
|
IButtonFactory buttonFactory) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
_channelNumber = channelNumber; |
|
|
|
Fader = faderFactory.Create(); |
|
|
|
Fader = faderFactory.Create(); |
|
|
|
Knob = knobFactory.Create(); |
|
|
|
Knob = knobFactory.Create(); |
|
|
|
Buttons = InitializeButtons(buttonConfiguration, buttonFactory); |
|
|
|
Buttons = InitializeButtons(buttonConfiguration, buttonFactory); |
|
|
|
@ -43,5 +47,7 @@ namespace Lib.Audio |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void OnFaderPositionChanged(object? sender, float position) => Controllable?.SetVolume(position); |
|
|
|
private void OnFaderPositionChanged(object? sender, float position) => Controllable?.SetVolume(position); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public override string ToString() => $"Channel {_channelNumber}"; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |