Tested DmpsAudioOutputController and matching bridge on processor successfully

This commit is contained in:
Neil Dorin
2019-08-29 17:34:19 -06:00
parent 6726e989a7
commit 176c9d9835
4 changed files with 30 additions and 11 deletions

View File

@@ -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);

View File

@@ -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
{

View File

@@ -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<int, DmpsAudioOutput> MicVolumeLevels { get; private set; }
Action MuteOnAction;
Action MuteOffAction;
Action<bool> 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

View File

@@ -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)