From 176c9d9835188d27716f4b575b9a2e863f0a19c9 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Thu, 29 Aug 2019 17:34:19 -0600 Subject: [PATCH] Tested DmpsAudioOutputController and matching bridge on processor successfully --- PepperDashEssentials/Bridges/BridgeBase.cs | 5 +++++ PepperDashEssentials/ControlSystem.cs | 3 +++ .../Chassis/DmpsAudioOutputController.cs | 12 +++-------- .../Chassis/DmpsRoutingController.cs | 21 +++++++++++++++++-- 4 files changed, 30 insertions(+), 11 deletions(-) diff --git a/PepperDashEssentials/Bridges/BridgeBase.cs b/PepperDashEssentials/Bridges/BridgeBase.cs index 68ca0751..cb452029 100644 --- a/PepperDashEssentials/Bridges/BridgeBase.cs +++ b/PepperDashEssentials/Bridges/BridgeBase.cs @@ -107,6 +107,11 @@ namespace PepperDash.Essentials.Bridges (device as DmpsRoutingController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey); continue; } + else if (device is DmpsAudioOutputController) + { + (device as DmpsAudioOutputController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey); + continue; + } else if (device is DmTxControllerBase) { (device as DmTxControllerBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey); diff --git a/PepperDashEssentials/ControlSystem.cs b/PepperDashEssentials/ControlSystem.cs index 795a4228..c89f4948 100644 --- a/PepperDashEssentials/ControlSystem.cs +++ b/PepperDashEssentials/ControlSystem.cs @@ -365,7 +365,10 @@ namespace PepperDash.Essentials Debug.Console(2, "Adding DmpsRoutingController for {0} to Device Manager.", this.ControllerPrompt); var dmpsRoutingController = DmpsRoutingController.GetDmpsRoutingController("processor-avRouting", this.ControllerPrompt, new DM.Config.DmpsRoutingPropertiesConfig()); + DeviceManager.AddDevice(dmpsRoutingController); + + } else { diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmpsAudioOutputController.cs b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmpsAudioOutputController.cs index dfeac4ee..8856be01 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmpsAudioOutputController.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmpsAudioOutputController.cs @@ -27,6 +27,7 @@ namespace PepperDash.Essentials.DM public DmpsAudioOutput Codec1VolumeLevel { get; private set; } public DmpsAudioOutput Codec2VolumeLevel { get; private set; } + public DmpsAudioOutputController(string key, string name, Card.Dmps3OutputBase card) : base(key, name) { @@ -39,6 +40,8 @@ namespace PepperDash.Essentials.DM if (card is Card.Dmps3ProgramOutput) { + //(card as Card.Dmps3ProgramOutput).OutputMixer.MicLevel + //TODO: Hook up mic levels and mutes Codec1VolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Codec1); Codec2VolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Codec2); } @@ -50,7 +53,6 @@ namespace PepperDash.Essentials.DM { Codec1VolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Codec1); } - } void BaseDevice_DMOutputChange(Switch device, DMOutputEventArgs args) @@ -111,8 +113,6 @@ namespace PepperDash.Essentials.DM public BoolFeedback MuteFeedback { get; private set; } public IntFeedback VolumeLevelFeedback { get; private set; } - public Dictionary MicVolumeLevels { get; private set; } - Action MuteOnAction; Action MuteOffAction; Action VolumeUpAction; @@ -229,12 +229,6 @@ namespace PepperDash.Essentials.DM } } - var numberOfMics = Global.ControlSystem.NumberOfMicrophones; - - for (int i = 1; i <= numberOfMics; i++) - { - // Construct each mic level here - } } #region IBasicVolumeWithFeedback Members diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmpsRoutingController.cs b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmpsRoutingController.cs index 350c11b5..8f2f39e0 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmpsRoutingController.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmpsRoutingController.cs @@ -370,14 +370,31 @@ namespace PepperDash.Essentials.DM else if (outputCard is Card.Dmps3ProgramOutput) { AddAudioOnlyOutputPort(number, "Program"); + + var programOutput = new DmpsAudioOutputController(string.Format("processor-programAudioOutput"), "Program Audio Output", outputCard as Card.Dmps3OutputBase); + + DeviceManager.AddDevice(programOutput); + return; } else if (outputCard is Card.Dmps3AuxOutput) { - if(outputCard.CardInputOutputType == eCardInputOutputType.Dmps3Aux1Output) + if (outputCard.CardInputOutputType == eCardInputOutputType.Dmps3Aux1Output) + { AddAudioOnlyOutputPort(number, "Aux1"); - else if(outputCard.CardInputOutputType == eCardInputOutputType.Dmps3Aux2Output) + + var aux1Output = new DmpsAudioOutputController(string.Format("processor-aux1AudioOutput"), "Program Audio Output", outputCard as Card.Dmps3OutputBase); + + DeviceManager.AddDevice(aux1Output); + } + else if (outputCard.CardInputOutputType == eCardInputOutputType.Dmps3Aux2Output) + { AddAudioOnlyOutputPort(number, "Aux2"); + + var aux2Output = new DmpsAudioOutputController(string.Format("processor-aux2AudioOutput"), "Program Audio Output", outputCard as Card.Dmps3OutputBase); + + DeviceManager.AddDevice(aux2Output); + } return; } else if (outputCard is Card.Dmps3CodecOutput)