feat: add output audio controller

This commit is contained in:
Jason DeVito
2023-11-03 18:14:53 -05:00
parent c528fecb9a
commit a64b5240ad
4 changed files with 123 additions and 9 deletions

View File

@@ -1,15 +1,17 @@
using System;
using Crestron.SimplSharpPro.DeviceSupport;
using Crestron.SimplSharpPro.DM;
using PepperDash.Core;
using PepperDash.Essentials.Core;
namespace PepperDash_Essentials_DM.Chassis
{
public class HdPsXxxAnalogAuxMixerController : IKeyed, IBasicVolumeWithFeedback
public class HdPsXxxAnalogAuxMixerController : IKeyed,
IHasVolumeControlWithFeedback, IHasMuteControlWithFeedback // || IBasicVolumeWithFeedback
{
public string Key { get; private set; }
public HdPsXxxAnalogAuxMixer Mixer { get; set; }
public HdPsXxxAnalogAuxMixer Mixer { get; private set; }
public HdPsXxxAnalogAuxMixerController(string parent, uint mixer, HdPsXxx chassis)
{
@@ -17,10 +19,17 @@ namespace PepperDash_Essentials_DM.Chassis
Mixer = chassis.AnalogAuxiliaryMixer[mixer];
Mixer.AuxMixerPropertyChange += OnAuxMixerPropertyChange;
VolumeLevelFeedback = new IntFeedback(VolumeFeedbackFunc);
MuteFeedback = new BoolFeedback(MuteFeedbackFunc);
}
private void OnAuxMixerPropertyChange(object sender, GenericEventArgs args)
{
Debug.Console(2, this, "AuxMixerPropertyChange: {0} > Index-{1}, EventId-{2}", sender.ToString(), args.Index, args.EventId);
}
#region Volume
public IntFeedback VolumeLevelFeedback { get; private set; }