mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 20:54:55 +00:00
Improvements for DMPS3-4K-150 types
This commit is contained in:
@@ -6,6 +6,7 @@ using System.Collections.Generic;
|
|||||||
using Crestron.SimplSharp.CrestronIO;
|
using Crestron.SimplSharp.CrestronIO;
|
||||||
using Crestron.SimplSharp.CrestronDataStore;
|
using Crestron.SimplSharp.CrestronDataStore;
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
|
using Crestron.SimplSharpPro.DM;
|
||||||
|
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.License;
|
using PepperDash.Essentials.License;
|
||||||
@@ -39,7 +40,14 @@ namespace PepperDash.Essentials.Core
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return ControlSystem.ControllerPrompt.ToLower().IndexOf("dmps") > -1;
|
if(ControlSystem.SystemControl != null)
|
||||||
|
{
|
||||||
|
if(ControlSystem.SystemControl.SystemControlType > 0)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,7 +58,39 @@ namespace PepperDash.Essentials.Core
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return ControlSystemIsDmpsType && ControlSystem.ControllerPrompt.ToLower().IndexOf("4k") > -1;
|
if(ControlSystem.SystemControl != null)
|
||||||
|
{
|
||||||
|
if(ControlSystem.SystemControl.SystemControlType == eSystemControlType.Dmps34K150CSystemControl ||
|
||||||
|
ControlSystem.SystemControl.SystemControlType == eSystemControlType.Dmps34K200CSystemControl ||
|
||||||
|
ControlSystem.SystemControl.SystemControlType == eSystemControlType.Dmps34K250CSystemControl ||
|
||||||
|
ControlSystem.SystemControl.SystemControlType == eSystemControlType.Dmps34K300CSystemControl ||
|
||||||
|
ControlSystem.SystemControl.SystemControlType == eSystemControlType.Dmps34K350CSystemControl)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// True when the processor type is a DMPS 4K 200/300/250/350 variant
|
||||||
|
/// </summary>
|
||||||
|
public static bool ControlSystemIsDmps4k3xxType
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if(ControlSystem.SystemControl != null)
|
||||||
|
{
|
||||||
|
if(ControlSystem.SystemControl.SystemControlType == eSystemControlType.Dmps34K200CSystemControl ||
|
||||||
|
ControlSystem.SystemControl.SystemControlType == eSystemControlType.Dmps34K250CSystemControl ||
|
||||||
|
ControlSystem.SystemControl.SystemControlType == eSystemControlType.Dmps34K300CSystemControl ||
|
||||||
|
ControlSystem.SystemControl.SystemControlType == eSystemControlType.Dmps34K350CSystemControl)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,60 +17,89 @@ using PepperDash.Essentials.DM.Config;
|
|||||||
namespace PepperDash.Essentials.DM
|
namespace PepperDash.Essentials.DM
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Exposes the volume levels for Program, Aux1 or Aux2 outputs on a DMPS3 chassis
|
/// Exposes the volume levels for Program, Aux1, Aux2, Codec1, Codec2, and Digital outputs on a DMPS3 chassis
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class DmpsAudioOutputController : EssentialsBridgeableDevice
|
public class DmpsAudioOutputController : EssentialsBridgeableDevice
|
||||||
{
|
{
|
||||||
Card.Dmps3OutputBase OutputCard;
|
|
||||||
|
|
||||||
public DmpsAudioOutput MasterVolumeLevel { get; private set; }
|
public DmpsAudioOutput MasterVolumeLevel { get; private set; }
|
||||||
public DmpsAudioOutput SourceVolumeLevel { get; private set; }
|
public DmpsAudioOutput SourceVolumeLevel { get; private set; }
|
||||||
public DmpsAudioOutput MicsMasterVolumeLevel { get; private set; }
|
public DmpsAudioOutput MicsMasterVolumeLevel { get; private set; }
|
||||||
public DmpsAudioOutput Codec1VolumeLevel { get; private set; }
|
public DmpsAudioOutput Codec1VolumeLevel { get; private set; }
|
||||||
public DmpsAudioOutput Codec2VolumeLevel { get; private set; }
|
public DmpsAudioOutput Codec2VolumeLevel { get; private set; }
|
||||||
|
|
||||||
|
public DmpsAudioOutputController(string key, string name, DMOutput card, Card.Dmps3DmHdmiAudioOutput.Dmps3AudioOutputStream stream)
|
||||||
|
: base(key, name)
|
||||||
|
{
|
||||||
|
card.BaseDevice.DMOutputChange += new DMOutputEventHandler(BaseDevice_DMOutputChange);
|
||||||
|
var output = new Dmps3AudioOutputWithMixerBase(stream);
|
||||||
|
MasterVolumeLevel = new DmpsAudioOutputWithMixer(output, eDmpsLevelType.Master);
|
||||||
|
SourceVolumeLevel = new DmpsAudioOutput(output, eDmpsLevelType.Source);
|
||||||
|
}
|
||||||
|
public DmpsAudioOutputController(string key, string name, DMOutput card, Card.Dmps3DmHdmiAudioOutput.Dmps3DmHdmiOutputStream stream)
|
||||||
|
: base(key, name)
|
||||||
|
{
|
||||||
|
card.BaseDevice.DMOutputChange += new DMOutputEventHandler(BaseDevice_DMOutputChange);
|
||||||
|
var output = new Dmps3AudioOutputWithMixerBase(stream);
|
||||||
|
MasterVolumeLevel = new DmpsAudioOutputWithMixer(output, eDmpsLevelType.Master);
|
||||||
|
SourceVolumeLevel = new DmpsAudioOutput(output, eDmpsLevelType.Source);
|
||||||
|
}
|
||||||
|
|
||||||
public DmpsAudioOutputController(string key, string name, Card.Dmps3OutputBase card)
|
public DmpsAudioOutputController(string key, string name, Card.Dmps3OutputBase card)
|
||||||
: base(key, name)
|
: base(key, name)
|
||||||
{
|
{
|
||||||
OutputCard = card;
|
card.BaseDevice.DMOutputChange += new DMOutputEventHandler(BaseDevice_DMOutputChange);
|
||||||
OutputCard.BaseDevice.DMOutputChange += new DMOutputEventHandler(BaseDevice_DMOutputChange);
|
|
||||||
|
|
||||||
SourceVolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Source);
|
|
||||||
MicsMasterVolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.MicsMaster);
|
|
||||||
|
|
||||||
if (card is Card.Dmps3ProgramOutput)
|
if (card is Card.Dmps3ProgramOutput)
|
||||||
{
|
{
|
||||||
var output = card as Card.Dmps3ProgramOutput;
|
var programOutput = card as Card.Dmps3ProgramOutput;
|
||||||
MasterVolumeLevel = new DmpsAudioOutputWithMixerAndEq(card, eDmpsLevelType.Master, output.OutputMixer, output.OutputEqualizer);
|
var output = new Dmps3AudioOutputWithMixerBase(card, programOutput.OutputMixer);
|
||||||
Codec1VolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Codec1);
|
MasterVolumeLevel = new DmpsAudioOutputWithMixerAndEq(output, eDmpsLevelType.Master, programOutput.OutputEqualizer);
|
||||||
Codec2VolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Codec2);
|
SourceVolumeLevel = new DmpsAudioOutput(output, eDmpsLevelType.Source);
|
||||||
|
MicsMasterVolumeLevel = new DmpsAudioOutput(output, eDmpsLevelType.MicsMaster);
|
||||||
|
Codec1VolumeLevel = new DmpsAudioOutput(output, eDmpsLevelType.Codec1);
|
||||||
|
Codec2VolumeLevel = new DmpsAudioOutput(output, eDmpsLevelType.Codec2);
|
||||||
}
|
}
|
||||||
else if (card is Card.Dmps3Aux1Output)
|
else if (card is Card.Dmps3Aux1Output)
|
||||||
{
|
{
|
||||||
var output = card as Card.Dmps3Aux1Output;
|
var auxOutput = card as Card.Dmps3Aux1Output;
|
||||||
MasterVolumeLevel = new DmpsAudioOutputWithMixerAndEq(card, eDmpsLevelType.Master, output.OutputMixer, output.OutputEqualizer);
|
var output = new Dmps3AudioOutputWithMixerBase(card, auxOutput.OutputMixer);
|
||||||
Codec2VolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Codec2);
|
MasterVolumeLevel = new DmpsAudioOutputWithMixerAndEq(output, eDmpsLevelType.Master, auxOutput.OutputEqualizer);
|
||||||
|
SourceVolumeLevel = new DmpsAudioOutput(output, eDmpsLevelType.Source);
|
||||||
|
MicsMasterVolumeLevel = new DmpsAudioOutput(output, eDmpsLevelType.MicsMaster);
|
||||||
|
Codec2VolumeLevel = new DmpsAudioOutput(output, eDmpsLevelType.Codec2);
|
||||||
}
|
}
|
||||||
else if (card is Card.Dmps3Aux2Output)
|
else if (card is Card.Dmps3Aux2Output)
|
||||||
{
|
{
|
||||||
var output = card as Card.Dmps3Aux2Output;
|
var auxOutput = card as Card.Dmps3Aux2Output;
|
||||||
MasterVolumeLevel = new DmpsAudioOutputWithMixerAndEq(card, eDmpsLevelType.Master, output.OutputMixer, output.OutputEqualizer);
|
var output = new Dmps3AudioOutputWithMixerBase(card, auxOutput.OutputMixer);
|
||||||
Codec1VolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Codec1);
|
MasterVolumeLevel = new DmpsAudioOutputWithMixerAndEq(output, eDmpsLevelType.Master, auxOutput.OutputEqualizer);
|
||||||
|
SourceVolumeLevel = new DmpsAudioOutput(output, eDmpsLevelType.Source);
|
||||||
|
MicsMasterVolumeLevel = new DmpsAudioOutput(output, eDmpsLevelType.MicsMaster);
|
||||||
|
Codec1VolumeLevel = new DmpsAudioOutput(output, eDmpsLevelType.Codec1);
|
||||||
}
|
}
|
||||||
else if (card is Card.Dmps3DigitalMixOutput)
|
else if (card is Card.Dmps3DigitalMixOutput)
|
||||||
{
|
{
|
||||||
var output = card as Card.Dmps3DigitalMixOutput;
|
var mixOutput = card as Card.Dmps3DigitalMixOutput;
|
||||||
MasterVolumeLevel = new DmpsAudioOutputWithMixer(card, eDmpsLevelType.Master, output.OutputMixer);
|
var output = new Dmps3AudioOutputWithMixerBase(card, mixOutput.OutputMixer);
|
||||||
|
MasterVolumeLevel = new DmpsAudioOutputWithMixer(output, eDmpsLevelType.Master);
|
||||||
|
SourceVolumeLevel = new DmpsAudioOutput(output, eDmpsLevelType.Source);
|
||||||
|
MicsMasterVolumeLevel = new DmpsAudioOutput(output, eDmpsLevelType.MicsMaster);
|
||||||
}
|
}
|
||||||
else if (card is Card.Dmps3HdmiOutput)
|
else if (card is Card.Dmps3HdmiOutput)
|
||||||
{
|
{
|
||||||
var output = card as Card.Dmps3HdmiOutput;
|
var hdmiOutput = card as Card.Dmps3HdmiOutput;
|
||||||
MasterVolumeLevel = new DmpsAudioOutputWithMixer(card, eDmpsLevelType.Master, output.OutputMixer);
|
var output = new Dmps3AudioOutputWithMixerBase(card, hdmiOutput.OutputMixer);
|
||||||
|
MasterVolumeLevel = new DmpsAudioOutputWithMixer(output, eDmpsLevelType.Master);
|
||||||
|
SourceVolumeLevel = new DmpsAudioOutput(output, eDmpsLevelType.Source);
|
||||||
|
MicsMasterVolumeLevel = new DmpsAudioOutput(output, eDmpsLevelType.MicsMaster);
|
||||||
}
|
}
|
||||||
else if (card is Card.Dmps3DmOutput)
|
else if (card is Card.Dmps3DmOutput)
|
||||||
{
|
{
|
||||||
var output = card as Card.Dmps3DmOutput;
|
var dmOutput = card as Card.Dmps3DmOutput;
|
||||||
MasterVolumeLevel = new DmpsAudioOutputWithMixer(card, eDmpsLevelType.Master, output.OutputMixer);
|
var output = new Dmps3AudioOutputWithMixerBase(card, dmOutput.OutputMixer);
|
||||||
|
MasterVolumeLevel = new DmpsAudioOutputWithMixer(output, eDmpsLevelType.Master);
|
||||||
|
SourceVolumeLevel = new DmpsAudioOutput(output, eDmpsLevelType.Source);
|
||||||
|
MicsMasterVolumeLevel = new DmpsAudioOutput(output, eDmpsLevelType.MicsMaster);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -250,8 +279,8 @@ namespace PepperDash.Essentials.DM
|
|||||||
public class DmpsAudioOutputWithMixerAndEq : DmpsAudioOutputWithMixer
|
public class DmpsAudioOutputWithMixerAndEq : DmpsAudioOutputWithMixer
|
||||||
{
|
{
|
||||||
private CrestronControlSystem.Dmps3OutputEqualizer Eq;
|
private CrestronControlSystem.Dmps3OutputEqualizer Eq;
|
||||||
public DmpsAudioOutputWithMixerAndEq(Card.Dmps3OutputBase output, eDmpsLevelType type, CrestronControlSystem.Dmps3OutputMixer mixer, CrestronControlSystem.Dmps3OutputEqualizer eq)
|
public DmpsAudioOutputWithMixerAndEq(Dmps3AudioOutputWithMixerBase output, eDmpsLevelType type, CrestronControlSystem.Dmps3OutputEqualizer eq)
|
||||||
: base(output, type, mixer)
|
: base(output, type)
|
||||||
{
|
{
|
||||||
Eq = eq;
|
Eq = eq;
|
||||||
}
|
}
|
||||||
@@ -265,19 +294,19 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
public class DmpsAudioOutputWithMixer : DmpsAudioOutput
|
public class DmpsAudioOutputWithMixer : DmpsAudioOutput
|
||||||
{
|
{
|
||||||
IDmps3OutputMixer Mixer;
|
Dmps3AudioOutputWithMixerBase Output;
|
||||||
|
|
||||||
public DmpsAudioOutputWithMixer(Card.Dmps3OutputBase output, eDmpsLevelType type, IDmps3OutputMixer mixer)
|
public DmpsAudioOutputWithMixer(Dmps3AudioOutputWithMixerBase output, eDmpsLevelType type)
|
||||||
: base(output, type)
|
: base(output, type)
|
||||||
{
|
{
|
||||||
Mixer = mixer;
|
Output = output;
|
||||||
GetVolumeMax();
|
GetVolumeMax();
|
||||||
GetVolumeMin();
|
GetVolumeMin();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void GetVolumeMin()
|
public void GetVolumeMin()
|
||||||
{
|
{
|
||||||
MinLevel = (short)Mixer.MinVolumeFeedback.UShortValue;
|
MinLevel = (short)Output.MinVolumeFeedback.UShortValue;
|
||||||
if (VolumeLevelScaledFeedback != null)
|
if (VolumeLevelScaledFeedback != null)
|
||||||
{
|
{
|
||||||
VolumeLevelScaledFeedback.FireUpdate();
|
VolumeLevelScaledFeedback.FireUpdate();
|
||||||
@@ -286,7 +315,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
public void GetVolumeMax()
|
public void GetVolumeMax()
|
||||||
{
|
{
|
||||||
MaxLevel = (short)Mixer.MaxVolumeFeedback.UShortValue;
|
MaxLevel = (short)Output.MaxVolumeFeedback.UShortValue;
|
||||||
if (VolumeLevelScaledFeedback != null)
|
if (VolumeLevelScaledFeedback != null)
|
||||||
{
|
{
|
||||||
VolumeLevelScaledFeedback.FireUpdate();
|
VolumeLevelScaledFeedback.FireUpdate();
|
||||||
@@ -295,32 +324,22 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
public void RecallPreset(ushort preset)
|
public void RecallPreset(ushort preset)
|
||||||
{
|
{
|
||||||
if (Mixer is CrestronControlSystem.Dmps3OutputMixer)
|
Output.PresetNumber.UShortValue = preset;
|
||||||
{
|
Output.RecallPreset();
|
||||||
var presetMixer = Mixer as CrestronControlSystem.Dmps3OutputMixer;
|
|
||||||
Debug.Console(1, "DMPS Recalling Preset {0}", preset);
|
|
||||||
presetMixer.PresetNumber.UShortValue = preset;
|
|
||||||
presetMixer.RecallPreset();
|
|
||||||
|
|
||||||
|
if (!Global.ControlSystemIsDmps4kType)
|
||||||
|
{
|
||||||
//Recall startup volume for main volume level as DMPS3(non-4K) presets don't affect the main volume
|
//Recall startup volume for main volume level as DMPS3(non-4K) presets don't affect the main volume
|
||||||
RecallStartupVolume();
|
RecallStartupVolume();
|
||||||
}
|
}
|
||||||
else if (Mixer is CrestronControlSystem.Dmps3AttachableOutputMixer)
|
|
||||||
{
|
|
||||||
var presetMixer = Mixer as CrestronControlSystem.Dmps3AttachableOutputMixer;
|
|
||||||
Debug.Console(1, "DMPS Recalling Preset {0}", preset);
|
|
||||||
presetMixer.PresetNumber.UShortValue = preset;
|
|
||||||
presetMixer.RecallPreset();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RecallStartupVolume()
|
public void RecallStartupVolume()
|
||||||
{
|
{
|
||||||
ushort startupVol = Mixer.StartupVolumeFeedback.UShortValue;
|
ushort startupVol = Output.StartupVolumeFeedback.UShortValue;
|
||||||
//Reset startup vol due to bug on DMPS3 where getting the value from above method clears the startup volume
|
//Reset startup vol due to bug on DMPS3 where getting the value from above method clears the startup volume
|
||||||
Mixer.StartupVolume.UShortValue = startupVol;
|
Output.StartupVolume.UShortValue = startupVol;
|
||||||
Debug.Console(1, "DMPS Recalling {0} Startup Volume {1}", Output.Name, startupVol);
|
Debug.Console(1, "DMPS Recalling Startup Volume {0}", startupVol);
|
||||||
SetVolume(startupVol);
|
SetVolume(startupVol);
|
||||||
MuteOff();
|
MuteOff();
|
||||||
}
|
}
|
||||||
@@ -329,7 +348,6 @@ namespace PepperDash.Essentials.DM
|
|||||||
public class DmpsAudioOutput : IBasicVolumeWithFeedback
|
public class DmpsAudioOutput : IBasicVolumeWithFeedback
|
||||||
{
|
{
|
||||||
private UShortInputSig Level;
|
private UShortInputSig Level;
|
||||||
protected Card.Dmps3OutputBase Output;
|
|
||||||
private bool EnableVolumeSend;
|
private bool EnableVolumeSend;
|
||||||
private ushort VolumeLevelInput;
|
private ushort VolumeLevelInput;
|
||||||
protected short MinLevel { get; set; }
|
protected short MinLevel { get; set; }
|
||||||
@@ -345,9 +363,8 @@ namespace PepperDash.Essentials.DM
|
|||||||
Action<bool> VolumeUpAction;
|
Action<bool> VolumeUpAction;
|
||||||
Action<bool> VolumeDownAction;
|
Action<bool> VolumeDownAction;
|
||||||
|
|
||||||
public DmpsAudioOutput(Card.Dmps3OutputBase output, eDmpsLevelType type)
|
public DmpsAudioOutput(Dmps3AudioOutputBase output, eDmpsLevelType type)
|
||||||
{
|
{
|
||||||
Output = output;
|
|
||||||
VolumeLevelInput = 0;
|
VolumeLevelInput = 0;
|
||||||
EnableVolumeSend = false;
|
EnableVolumeSend = false;
|
||||||
Type = type;
|
Type = type;
|
||||||
@@ -359,47 +376,46 @@ namespace PepperDash.Essentials.DM
|
|||||||
case eDmpsLevelType.Master:
|
case eDmpsLevelType.Master:
|
||||||
{
|
{
|
||||||
Level = output.MasterVolume;
|
Level = output.MasterVolume;
|
||||||
|
MuteFeedback = new BoolFeedback(new Func<bool>(() => output.MasterMuteOnFeedBack.BoolValue));
|
||||||
MuteFeedback = new BoolFeedback(new Func<bool>(() => Output.MasterMuteOnFeedBack.BoolValue));
|
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => output.MasterVolumeFeedBack.UShortValue));
|
||||||
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => Output.MasterVolumeFeedBack.UShortValue));
|
MuteOnAction = new Action(output.MasterMuteOn);
|
||||||
MuteOnAction = new Action(Output.MasterMuteOn);
|
MuteOffAction = new Action(output.MasterMuteOff);
|
||||||
MuteOffAction = new Action(Output.MasterMuteOff);
|
VolumeUpAction = new Action<bool>((b) => output.MasterVolumeUp.BoolValue = b);
|
||||||
VolumeUpAction = new Action<bool>((b) => Output.MasterVolumeUp.BoolValue = b);
|
VolumeDownAction = new Action<bool>((b) => output.MasterVolumeDown.BoolValue = b);
|
||||||
VolumeDownAction = new Action<bool>((b) => Output.MasterVolumeDown.BoolValue = b);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case eDmpsLevelType.MicsMaster:
|
case eDmpsLevelType.MicsMaster:
|
||||||
{
|
{
|
||||||
Level = output.MicMasterLevel;
|
if (output.Card is Card.Dmps3OutputBase)
|
||||||
|
{
|
||||||
MuteFeedback = new BoolFeedback(new Func<bool>(() => Output.MicMasterMuteOnFeedBack.BoolValue));
|
var micOutput = output.Card as Card.Dmps3OutputBase;
|
||||||
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => Output.MicMasterLevelFeedBack.UShortValue));
|
Level = micOutput.MicMasterLevel;
|
||||||
MuteOnAction = new Action(Output.MicMasterMuteOn);
|
MuteFeedback = new BoolFeedback(new Func<bool>(() => micOutput.MicMasterMuteOnFeedBack.BoolValue));
|
||||||
MuteOffAction = new Action(Output.MicMasterMuteOff);
|
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => micOutput.MicMasterLevelFeedBack.UShortValue));
|
||||||
VolumeUpAction = new Action<bool>((b) => Output.MicMasterLevelUp.BoolValue = b);
|
MuteOnAction = new Action(micOutput.MicMasterMuteOn);
|
||||||
VolumeDownAction = new Action<bool>((b) => Output.MicMasterLevelDown.BoolValue = b);
|
MuteOffAction = new Action(micOutput.MicMasterMuteOff);
|
||||||
|
VolumeUpAction = new Action<bool>((b) => micOutput.MicMasterLevelUp.BoolValue = b);
|
||||||
|
VolumeDownAction = new Action<bool>((b) => micOutput.MicMasterLevelDown.BoolValue = b);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case eDmpsLevelType.Source:
|
case eDmpsLevelType.Source:
|
||||||
{
|
{
|
||||||
Level = output.SourceLevel;
|
Level = output.SourceLevel;
|
||||||
|
MuteFeedback = new BoolFeedback(new Func<bool>(() => output.SourceMuteOnFeedBack.BoolValue));
|
||||||
MuteFeedback = new BoolFeedback(new Func<bool>(() => Output.SourceMuteOnFeedBack.BoolValue));
|
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => output.SourceLevelFeedBack.UShortValue));
|
||||||
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => Output.SourceLevelFeedBack.UShortValue));
|
MuteOnAction = new Action(output.SourceMuteOn);
|
||||||
MuteOnAction = new Action(Output.SourceMuteOn);
|
MuteOffAction = new Action(output.SourceMuteOff);
|
||||||
MuteOffAction = new Action(Output.SourceMuteOff);
|
VolumeUpAction = new Action<bool>((b) => output.SourceLevelUp.BoolValue = b);
|
||||||
VolumeUpAction = new Action<bool>((b) => Output.SourceLevelUp.BoolValue = b);
|
VolumeDownAction = new Action<bool>((b) => output.SourceLevelDown.BoolValue = b);
|
||||||
VolumeDownAction = new Action<bool>((b) => Output.SourceLevelDown.BoolValue = b);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case eDmpsLevelType.Codec1:
|
case eDmpsLevelType.Codec1:
|
||||||
{
|
{
|
||||||
var programOutput = output as Card.Dmps3ProgramOutput;
|
if (output.Card is Card.Dmps3ProgramOutput)
|
||||||
|
|
||||||
if (programOutput != null)
|
|
||||||
{
|
{
|
||||||
|
var programOutput = output.Card as Card.Dmps3ProgramOutput;
|
||||||
Level = programOutput.Codec1Level;
|
Level = programOutput.Codec1Level;
|
||||||
|
|
||||||
MuteFeedback = new BoolFeedback(new Func<bool>(() => programOutput.CodecMute1OnFeedback.BoolValue));
|
MuteFeedback = new BoolFeedback(new Func<bool>(() => programOutput.CodecMute1OnFeedback.BoolValue));
|
||||||
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => programOutput.Codec1LevelFeedback.UShortValue));
|
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => programOutput.Codec1LevelFeedback.UShortValue));
|
||||||
MuteOnAction = new Action(programOutput.Codec1MuteOn);
|
MuteOnAction = new Action(programOutput.Codec1MuteOn);
|
||||||
@@ -407,12 +423,10 @@ namespace PepperDash.Essentials.DM
|
|||||||
VolumeUpAction = new Action<bool>((b) => programOutput.Codec1LevelUp.BoolValue = b);
|
VolumeUpAction = new Action<bool>((b) => programOutput.Codec1LevelUp.BoolValue = b);
|
||||||
VolumeDownAction = new Action<bool>((b) => programOutput.Codec1LevelDown.BoolValue = b);
|
VolumeDownAction = new Action<bool>((b) => programOutput.Codec1LevelDown.BoolValue = b);
|
||||||
}
|
}
|
||||||
else
|
else if (output.Card is Card.Dmps3Aux2Output)
|
||||||
{
|
{
|
||||||
var auxOutput = output as Card.Dmps3Aux2Output;
|
var auxOutput = output.Card as Card.Dmps3Aux2Output;
|
||||||
|
|
||||||
Level = auxOutput.Codec1Level;
|
Level = auxOutput.Codec1Level;
|
||||||
|
|
||||||
MuteFeedback = new BoolFeedback(new Func<bool>(() => auxOutput.CodecMute1OnFeedback.BoolValue));
|
MuteFeedback = new BoolFeedback(new Func<bool>(() => auxOutput.CodecMute1OnFeedback.BoolValue));
|
||||||
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => auxOutput.Codec1LevelFeedback.UShortValue));
|
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => auxOutput.Codec1LevelFeedback.UShortValue));
|
||||||
MuteOnAction = new Action(auxOutput.Codec1MuteOn);
|
MuteOnAction = new Action(auxOutput.Codec1MuteOn);
|
||||||
@@ -424,12 +438,10 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
case eDmpsLevelType.Codec2:
|
case eDmpsLevelType.Codec2:
|
||||||
{
|
{
|
||||||
var programOutput = output as Card.Dmps3ProgramOutput;
|
if (output.Card is Card.Dmps3ProgramOutput)
|
||||||
|
|
||||||
if (programOutput != null)
|
|
||||||
{
|
{
|
||||||
|
var programOutput = output.Card as Card.Dmps3ProgramOutput;
|
||||||
Level = programOutput.Codec2Level;
|
Level = programOutput.Codec2Level;
|
||||||
|
|
||||||
MuteFeedback = new BoolFeedback(new Func<bool>(() => programOutput.CodecMute1OnFeedback.BoolValue));
|
MuteFeedback = new BoolFeedback(new Func<bool>(() => programOutput.CodecMute1OnFeedback.BoolValue));
|
||||||
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => programOutput.Codec2LevelFeedback.UShortValue));
|
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => programOutput.Codec2LevelFeedback.UShortValue));
|
||||||
MuteOnAction = new Action(programOutput.Codec2MuteOn);
|
MuteOnAction = new Action(programOutput.Codec2MuteOn);
|
||||||
@@ -437,12 +449,11 @@ namespace PepperDash.Essentials.DM
|
|||||||
VolumeUpAction = new Action<bool>((b) => programOutput.Codec2LevelUp.BoolValue = b);
|
VolumeUpAction = new Action<bool>((b) => programOutput.Codec2LevelUp.BoolValue = b);
|
||||||
VolumeDownAction = new Action<bool>((b) => programOutput.Codec2LevelDown.BoolValue = b);
|
VolumeDownAction = new Action<bool>((b) => programOutput.Codec2LevelDown.BoolValue = b);
|
||||||
}
|
}
|
||||||
else
|
else if (output.Card is Card.Dmps3Aux1Output)
|
||||||
{
|
{
|
||||||
var auxOutput = output as Card.Dmps3Aux1Output;
|
var auxOutput = output.Card as Card.Dmps3Aux1Output;
|
||||||
|
|
||||||
Level = auxOutput.Codec2Level;
|
Level = auxOutput.Codec2Level;
|
||||||
|
|
||||||
MuteFeedback = new BoolFeedback(new Func<bool>(() => auxOutput.CodecMute2OnFeedback.BoolValue));
|
MuteFeedback = new BoolFeedback(new Func<bool>(() => auxOutput.CodecMute2OnFeedback.BoolValue));
|
||||||
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => auxOutput.Codec2LevelFeedback.UShortValue));
|
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => auxOutput.Codec2LevelFeedback.UShortValue));
|
||||||
MuteOnAction = new Action(auxOutput.Codec2MuteOn);
|
MuteOnAction = new Action(auxOutput.Codec2MuteOn);
|
||||||
@@ -463,7 +474,6 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
public void SetVolumeScaled(ushort level)
|
public void SetVolumeScaled(ushort level)
|
||||||
{
|
{
|
||||||
Debug.Console(2, Debug.ErrorLogLevel.None, "Scaling DMPS volume:{0} level:{1} min:{2} max:{3}", Output.Name, level.ToString(), MinLevel.ToString(), MaxLevel.ToString());
|
|
||||||
if (ushort.MaxValue + MinLevel != 0)
|
if (ushort.MaxValue + MinLevel != 0)
|
||||||
{
|
{
|
||||||
VolumeLevelInput = (ushort)(level * (MaxLevel - MinLevel) / ushort.MaxValue + MinLevel);
|
VolumeLevelInput = (ushort)(level * (MaxLevel - MinLevel) / ushort.MaxValue + MinLevel);
|
||||||
@@ -477,7 +487,6 @@ namespace PepperDash.Essentials.DM
|
|||||||
public ushort ScaleVolumeFeedback(ushort level)
|
public ushort ScaleVolumeFeedback(ushort level)
|
||||||
{
|
{
|
||||||
short signedLevel = (short)level;
|
short signedLevel = (short)level;
|
||||||
Debug.Console(2, Debug.ErrorLogLevel.None, "Scaling DMPS volume:{0} feedback:{1} min:{2} max:{3}", Output.Name, signedLevel.ToString(), MinLevel.ToString(), MaxLevel.ToString());
|
|
||||||
|
|
||||||
if (MaxLevel - MinLevel != 0)
|
if (MaxLevel - MinLevel != 0)
|
||||||
{
|
{
|
||||||
@@ -538,6 +547,150 @@ namespace PepperDash.Essentials.DM
|
|||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class Dmps3AudioOutputWithMixerBase : Dmps3AudioOutputBase
|
||||||
|
{
|
||||||
|
public UShortOutputSig MinVolumeFeedback { get; private set; }
|
||||||
|
public UShortOutputSig MaxVolumeFeedback { get; private set; }
|
||||||
|
public UShortInputSig StartupVolume { get; private set; }
|
||||||
|
public UShortOutputSig StartupVolumeFeedback { get; private set; }
|
||||||
|
public UShortInputSig PresetNumber { get; private set; }
|
||||||
|
|
||||||
|
public Action RecallPreset { get; private set; }
|
||||||
|
|
||||||
|
public Dmps3AudioOutputWithMixerBase(Card.Dmps3OutputBase card, CrestronControlSystem.Dmps3OutputMixer mixer)
|
||||||
|
: base(card)
|
||||||
|
{
|
||||||
|
MinVolumeFeedback = mixer.MinVolumeFeedback;
|
||||||
|
MaxVolumeFeedback = mixer.MaxVolumeFeedback;
|
||||||
|
StartupVolume = mixer.StartupVolume;
|
||||||
|
StartupVolumeFeedback = mixer.StartupVolumeFeedback;
|
||||||
|
PresetNumber = mixer.PresetNumber;
|
||||||
|
|
||||||
|
RecallPreset = new Action(mixer.RecallPreset);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Dmps3AudioOutputWithMixerBase(Card.Dmps3OutputBase card, CrestronControlSystem.Dmps3AttachableOutputMixer mixer)
|
||||||
|
: base(card)
|
||||||
|
{
|
||||||
|
MinVolumeFeedback = mixer.MinVolumeFeedback;
|
||||||
|
MaxVolumeFeedback = mixer.MaxVolumeFeedback;
|
||||||
|
StartupVolume = mixer.StartupVolume;
|
||||||
|
StartupVolumeFeedback = mixer.StartupVolumeFeedback;
|
||||||
|
PresetNumber = mixer.PresetNumber;
|
||||||
|
|
||||||
|
RecallPreset = new Action(mixer.RecallPreset);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Dmps3AudioOutputWithMixerBase(Card.Dmps3DmHdmiAudioOutput.Dmps3AudioOutputStream stream)
|
||||||
|
: base(stream)
|
||||||
|
{
|
||||||
|
var mixer = stream.OutputMixer;
|
||||||
|
MinVolumeFeedback = mixer.MinVolumeFeedback;
|
||||||
|
MaxVolumeFeedback = mixer.MaxVolumeFeedback;
|
||||||
|
StartupVolume = mixer.StartupVolume;
|
||||||
|
StartupVolumeFeedback = mixer.StartupVolumeFeedback;
|
||||||
|
PresetNumber = stream.PresetNumber;
|
||||||
|
RecallPreset = new Action(stream.RecallPreset);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Dmps3AudioOutputWithMixerBase(Card.Dmps3DmHdmiAudioOutput.Dmps3DmHdmiOutputStream stream)
|
||||||
|
: base(stream)
|
||||||
|
{
|
||||||
|
var mixer = stream.OutputMixer;
|
||||||
|
MinVolumeFeedback = mixer.MinVolumeFeedback;
|
||||||
|
MaxVolumeFeedback = mixer.MaxVolumeFeedback;
|
||||||
|
StartupVolume = mixer.StartupVolume;
|
||||||
|
StartupVolumeFeedback = mixer.StartupVolumeFeedback;
|
||||||
|
PresetNumber = stream.PresetNumber;
|
||||||
|
RecallPreset = new Action(stream.RecallPreset);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public class Dmps3AudioOutputBase
|
||||||
|
{
|
||||||
|
public DMOutput Card { get; private set; }
|
||||||
|
public BoolOutputSig MasterMuteOffFeedBack { get; private set; }
|
||||||
|
public BoolOutputSig MasterMuteOnFeedBack { get; private set; }
|
||||||
|
public UShortInputSig MasterVolume { get; private set; }
|
||||||
|
public UShortOutputSig MasterVolumeFeedBack { get; private set; }
|
||||||
|
public BoolInputSig MasterVolumeUp { get; private set; }
|
||||||
|
public BoolInputSig MasterVolumeDown { get; private set; }
|
||||||
|
public BoolOutputSig SourceMuteOffFeedBack { get; private set; }
|
||||||
|
public BoolOutputSig SourceMuteOnFeedBack { get; private set; }
|
||||||
|
public UShortInputSig SourceLevel { get; private set; }
|
||||||
|
public UShortOutputSig SourceLevelFeedBack { get; private set; }
|
||||||
|
public BoolInputSig SourceLevelUp { get; private set; }
|
||||||
|
public BoolInputSig SourceLevelDown { get; private set; }
|
||||||
|
|
||||||
|
public Action MasterMuteOff { get; private set; }
|
||||||
|
public Action MasterMuteOn { get; private set; }
|
||||||
|
public Action SourceMuteOff { get; private set; }
|
||||||
|
public Action SourceMuteOn { get; private set; }
|
||||||
|
|
||||||
|
public Dmps3AudioOutputBase(Card.Dmps3OutputBase card)
|
||||||
|
{
|
||||||
|
Card = card;
|
||||||
|
MasterMuteOffFeedBack = card.MasterMuteOffFeedBack;
|
||||||
|
MasterMuteOnFeedBack = card.MasterMuteOnFeedBack;
|
||||||
|
MasterVolume = card.MasterVolume;
|
||||||
|
MasterVolumeFeedBack = card.MasterVolumeFeedBack;
|
||||||
|
MasterVolumeUp = card.MasterVolumeUp;
|
||||||
|
MasterVolumeDown = card.MasterVolumeDown;
|
||||||
|
SourceMuteOffFeedBack = card.SourceMuteOffFeedBack;
|
||||||
|
SourceMuteOnFeedBack = card.SourceMuteOnFeedBack;
|
||||||
|
SourceLevel = card.SourceLevel;
|
||||||
|
SourceLevelFeedBack = card.SourceLevelFeedBack;
|
||||||
|
SourceLevelUp = card.SourceLevelUp;
|
||||||
|
SourceLevelDown = card.SourceLevelDown;
|
||||||
|
|
||||||
|
MasterMuteOff = new Action(card.MasterMuteOff);
|
||||||
|
MasterMuteOn = new Action(card.MasterMuteOn);
|
||||||
|
SourceMuteOff = new Action(card.SourceMuteOff);
|
||||||
|
SourceMuteOn = new Action(card.SourceMuteOn);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Dmps3AudioOutputBase(Card.Dmps3DmHdmiAudioOutput.Dmps3AudioOutputStream stream)
|
||||||
|
{
|
||||||
|
MasterMuteOffFeedBack = stream.MasterMuteOffFeedBack;
|
||||||
|
MasterMuteOnFeedBack = stream.MasterMuteOnFeedBack;
|
||||||
|
MasterVolume = stream.MasterVolume;
|
||||||
|
MasterVolumeFeedBack = stream.MasterVolumeFeedBack;
|
||||||
|
MasterVolumeUp = stream.MasterVolumeUp;
|
||||||
|
MasterVolumeDown = stream.MasterVolumeDown;
|
||||||
|
SourceMuteOffFeedBack = stream.SourceMuteOffFeedBack;
|
||||||
|
SourceMuteOnFeedBack = stream.SourceMuteOnFeedBack;
|
||||||
|
SourceLevel = stream.SourceLevel;
|
||||||
|
SourceLevelFeedBack = stream.SourceLevelFeedBack;
|
||||||
|
SourceLevelUp = stream.SourceLevelUp;
|
||||||
|
SourceLevelDown = stream.SourceLevelDown;
|
||||||
|
|
||||||
|
MasterMuteOff = new Action(stream.MasterMuteOff);
|
||||||
|
MasterMuteOn = new Action(stream.MasterMuteOn);
|
||||||
|
SourceMuteOff = new Action(stream.SourceMuteOff);
|
||||||
|
SourceMuteOn = new Action(stream.SourceMuteOn);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Dmps3AudioOutputBase(Card.Dmps3DmHdmiAudioOutput.Dmps3DmHdmiOutputStream stream)
|
||||||
|
{
|
||||||
|
MasterMuteOffFeedBack = stream.MasterMuteOffFeedBack;
|
||||||
|
MasterMuteOnFeedBack = stream.MasterMuteOnFeedBack;
|
||||||
|
MasterVolume = stream.MasterVolume;
|
||||||
|
MasterVolumeFeedBack = stream.MasterVolumeFeedBack;
|
||||||
|
MasterVolumeUp = stream.MasterVolumeUp;
|
||||||
|
MasterVolumeDown = stream.MasterVolumeDown;
|
||||||
|
SourceMuteOffFeedBack = stream.SourceMuteOffFeedBack;
|
||||||
|
SourceMuteOnFeedBack = stream.SourceMuteOnFeedBack;
|
||||||
|
SourceLevel = stream.SourceLevel;
|
||||||
|
SourceLevelFeedBack = stream.SourceLevelFeedBack;
|
||||||
|
SourceLevelUp = stream.SourceLevelUp;
|
||||||
|
SourceLevelDown = stream.SourceLevelDown;
|
||||||
|
|
||||||
|
MasterMuteOff = new Action(stream.MasterMuteOff);
|
||||||
|
MasterMuteOn = new Action(stream.MasterMuteOn);
|
||||||
|
SourceMuteOff = new Action(stream.SourceMuteOff);
|
||||||
|
SourceMuteOn = new Action(stream.SourceMuteOn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public enum eDmpsLevelType
|
public enum eDmpsLevelType
|
||||||
{
|
{
|
||||||
Master,
|
Master,
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class DmpsDigitalOutputController : Device, IRoutingNumericWithFeedback, IHasFeedback
|
public class DmpsDigitalOutputController : Device, IRoutingNumeric, IHasFeedback
|
||||||
{
|
{
|
||||||
public Card.Dmps3OutputBase OutputCard { get; protected set; }
|
public Card.Dmps3OutputBase OutputCard { get; protected set; }
|
||||||
|
|
||||||
@@ -161,11 +161,5 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IRoutingFeedback Members
|
|
||||||
|
|
||||||
public event EventHandler<RoutingNumericEventArgs> NumericSwitchChange;
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -418,17 +418,11 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
private void LinkInputsToApi(BasicTriList trilist, DmpsRoutingControllerJoinMap joinMap)
|
private void LinkInputsToApi(BasicTriList trilist, DmpsRoutingControllerJoinMap joinMap)
|
||||||
{
|
{
|
||||||
if (Global.ControlSystemIsDmps4kType)
|
if (Global.ControlSystemIsDmps4k3xxType)
|
||||||
{
|
{
|
||||||
//DMPS-4K audio inputs 1-5 are aux inputs, add them after regular dm cards
|
|
||||||
for (ushort i = 1; i <= 5; i++)
|
|
||||||
{
|
|
||||||
trilist.StringInput[joinMap.InputAudioNames.JoinNumber + i - 1 + (ushort)Dmps.SwitcherInputs.Count].StringValue = String.Format("Aux Input {0}", i);
|
|
||||||
}
|
|
||||||
|
|
||||||
//Add DMPS-4K mixer input names to end of inputs
|
//Add DMPS-4K mixer input names to end of inputs
|
||||||
trilist.StringInput[joinMap.InputAudioNames.JoinNumber + (uint)Dmps.SwitcherInputs.Count + 5].StringValue = "Digital Mixer 1";
|
trilist.StringInput[joinMap.InputAudioNames.JoinNumber + (uint)Dmps.SwitcherInputs.Count + 4].StringValue = "Digital Mixer 1";
|
||||||
trilist.StringInput[joinMap.InputAudioNames.JoinNumber + (uint)Dmps.SwitcherInputs.Count + 6].StringValue = "Digital Mixer 2";
|
trilist.StringInput[joinMap.InputAudioNames.JoinNumber + (uint)Dmps.SwitcherInputs.Count + 5].StringValue = "Digital Mixer 2";
|
||||||
}
|
}
|
||||||
for (uint i = 1; i <= Dmps.SwitcherInputs.Count; i++)
|
for (uint i = 1; i <= Dmps.SwitcherInputs.Count; i++)
|
||||||
{
|
{
|
||||||
@@ -445,9 +439,19 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
if (InputNameFeedbacks.ContainsKey(ioSlot) && InputNameFeedbacks[ioSlot] != null)
|
if (InputNameFeedbacks.ContainsKey(ioSlot) && InputNameFeedbacks[ioSlot] != null)
|
||||||
{
|
{
|
||||||
InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputNames.JoinNumber + ioSlotJoin]);
|
if (Dmps.SwitcherInputs[ioSlot] is Card.Dmps3AnalogAudioInput)
|
||||||
InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputVideoNames.JoinNumber + ioSlotJoin]);
|
{
|
||||||
InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputAudioNames.JoinNumber + ioSlotJoin]);
|
for (uint j = ioSlot; j < ioSlot + 5; j++)
|
||||||
|
{
|
||||||
|
InputNameFeedbacks[j].LinkInputSig(trilist.StringInput[joinMap.InputAudioNames.JoinNumber + j - 1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputNames.JoinNumber + ioSlotJoin]);
|
||||||
|
InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputVideoNames.JoinNumber + ioSlotJoin]);
|
||||||
|
InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputAudioNames.JoinNumber + ioSlotJoin]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
trilist.SetStringSigAction(joinMap.InputNames.JoinNumber + ioSlotJoin, s =>
|
trilist.SetStringSigAction(joinMap.InputNames.JoinNumber + ioSlotJoin, s =>
|
||||||
@@ -509,7 +513,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
});
|
});
|
||||||
AudioOutputFeedbacks[outputCard.Number] = new IntFeedback(() =>
|
AudioOutputFeedbacks[outputCard.Number] = new IntFeedback(() =>
|
||||||
{
|
{
|
||||||
if (!Global.ControlSystemIsDmps4kType)
|
if (!Global.ControlSystemIsDmps4k3xxType)
|
||||||
{
|
{
|
||||||
if (outputCard.AudioOutFeedback != null)
|
if (outputCard.AudioOutFeedback != null)
|
||||||
{
|
{
|
||||||
@@ -526,9 +530,9 @@ namespace PepperDash.Essentials.DM
|
|||||||
if (DigitalAudioOutputs[outputCard.Number].AudioSourceNumericFeedback.UShortValue == 0)
|
if (DigitalAudioOutputs[outputCard.Number].AudioSourceNumericFeedback.UShortValue == 0)
|
||||||
return 0;
|
return 0;
|
||||||
else if (DigitalAudioOutputs[outputCard.Number].AudioSourceNumericFeedback.UShortValue == 1)
|
else if (DigitalAudioOutputs[outputCard.Number].AudioSourceNumericFeedback.UShortValue == 1)
|
||||||
return (ushort)Dmps.SwitcherInputs.Count + 6;
|
return (ushort)Dmps.SwitcherInputs.Count + 5;
|
||||||
else if (DigitalAudioOutputs[outputCard.Number].AudioSourceNumericFeedback.UShortValue == 2)
|
else if (DigitalAudioOutputs[outputCard.Number].AudioSourceNumericFeedback.UShortValue == 2)
|
||||||
return (ushort)Dmps.SwitcherInputs.Count + 7;
|
return (ushort)Dmps.SwitcherInputs.Count + 6;
|
||||||
else if (DigitalAudioOutputs[outputCard.Number].AudioSourceNumericFeedback.UShortValue == 3)
|
else if (DigitalAudioOutputs[outputCard.Number].AudioSourceNumericFeedback.UShortValue == 3)
|
||||||
return (ushort)outputCard.VideoOutFeedback.Number;
|
return (ushort)outputCard.VideoOutFeedback.Number;
|
||||||
else
|
else
|
||||||
@@ -552,7 +556,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
else if ((ushort)outputCard.AudioOutSourceFeedback <= 5)
|
else if ((ushort)outputCard.AudioOutSourceFeedback <= 5)
|
||||||
{
|
{
|
||||||
//Move analog inputs to after regular dm cards
|
//Move analog inputs to after regular dm cards
|
||||||
return (ushort)outputCard.AudioOutSourceFeedback + (ushort)Dmps.SwitcherInputs.Count;
|
return (ushort)outputCard.AudioOutSourceFeedback + (ushort)Dmps.SwitcherInputs.Count - 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -586,7 +590,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
});
|
});
|
||||||
OutputAudioRouteNameFeedbacks[outputCard.Number] = new StringFeedback(() =>
|
OutputAudioRouteNameFeedbacks[outputCard.Number] = new StringFeedback(() =>
|
||||||
{
|
{
|
||||||
if (!Global.ControlSystemIsDmps4kType)
|
if (!Global.ControlSystemIsDmps4k3xxType)
|
||||||
{
|
{
|
||||||
if (outputCard.AudioOutFeedback != null && outputCard.AudioOutFeedback.NameFeedback != null)
|
if (outputCard.AudioOutFeedback != null && outputCard.AudioOutFeedback.NameFeedback != null)
|
||||||
{
|
{
|
||||||
@@ -692,7 +696,6 @@ namespace PepperDash.Essentials.DM
|
|||||||
else if (inputCard is Card.Dmps3HdmiInput)
|
else if (inputCard is Card.Dmps3HdmiInput)
|
||||||
{
|
{
|
||||||
var hdmiInputCard = inputCard as Card.Dmps3HdmiInput;
|
var hdmiInputCard = inputCard as Card.Dmps3HdmiInput;
|
||||||
|
|
||||||
var cecPort = hdmiInputCard.HdmiInputPort;
|
var cecPort = hdmiInputCard.HdmiInputPort;
|
||||||
|
|
||||||
AddInputPortWithDebug(number, string.Format("HdmiIn{0}", number), eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, cecPort);
|
AddInputPortWithDebug(number, string.Format("HdmiIn{0}", number), eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, cecPort);
|
||||||
@@ -724,17 +727,37 @@ namespace PepperDash.Essentials.DM
|
|||||||
else if (inputCard is Card.Dmps3DmInput)
|
else if (inputCard is Card.Dmps3DmInput)
|
||||||
{
|
{
|
||||||
var hdmiInputCard = inputCard as Card.Dmps3DmInput;
|
var hdmiInputCard = inputCard as Card.Dmps3DmInput;
|
||||||
|
|
||||||
var cecPort = hdmiInputCard.DmInputPort;
|
var cecPort = hdmiInputCard.DmInputPort;
|
||||||
|
|
||||||
AddInputPortWithDebug(number, string.Format("DmIn{0}", number), eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, cecPort);
|
AddInputPortWithDebug(number, string.Format("DmIn{0}", number), eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, cecPort);
|
||||||
}
|
}
|
||||||
|
else if (inputCard is Card.Dmps3VgaInput)
|
||||||
|
{
|
||||||
|
AddInputPortWithDebug(number, string.Format("VgaIn{0}", number), eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Vga);
|
||||||
|
}
|
||||||
else if (inputCard is Card.Dmps3AirMediaInput)
|
else if (inputCard is Card.Dmps3AirMediaInput)
|
||||||
{
|
{
|
||||||
var airMediaInputCard = inputCard as Card.Dmps3AirMediaInput;
|
|
||||||
|
|
||||||
AddInputPortWithDebug(number, string.Format("AirMediaIn{0}", number), eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Streaming);
|
AddInputPortWithDebug(number, string.Format("AirMediaIn{0}", number), eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Streaming);
|
||||||
}
|
}
|
||||||
|
else if (inputCard is Card.Dmps3AnalogAudioInput)
|
||||||
|
{
|
||||||
|
for (uint i = 0; i <= 4; i++)
|
||||||
|
{
|
||||||
|
uint j = i + 1;
|
||||||
|
uint input = i + number;
|
||||||
|
InputNameFeedbacks[input] = new StringFeedback(() =>
|
||||||
|
{
|
||||||
|
if (InputNames.ContainsKey(input))
|
||||||
|
{
|
||||||
|
return InputNames[input];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return String.Format("Aux Input {0}", j);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -796,7 +819,6 @@ namespace PepperDash.Essentials.DM
|
|||||||
else if (outputCard is Card.Dmps3DmOutput)
|
else if (outputCard is Card.Dmps3DmOutput)
|
||||||
{
|
{
|
||||||
AddDmOutputPort(number);
|
AddDmOutputPort(number);
|
||||||
|
|
||||||
var audioOutput = new DmpsAudioOutputController(string.Format("processor-digitalAudioOutput{0}", number), string.Format("Dm Audio Output {0}", number), outputCard as Card.Dmps3DmOutput);
|
var audioOutput = new DmpsAudioOutputController(string.Format("processor-digitalAudioOutput{0}", number), string.Format("Dm Audio Output {0}", number), outputCard as Card.Dmps3DmOutput);
|
||||||
DeviceManager.AddDevice(audioOutput);
|
DeviceManager.AddDevice(audioOutput);
|
||||||
}
|
}
|
||||||
@@ -807,6 +829,19 @@ namespace PepperDash.Essentials.DM
|
|||||||
DigitalAudioOutputs.Add(number, audioOutput);
|
DigitalAudioOutputs.Add(number, audioOutput);
|
||||||
DeviceManager.AddDevice(audioOutput);
|
DeviceManager.AddDevice(audioOutput);
|
||||||
}
|
}
|
||||||
|
else if (outputCard is Card.Dmps3DmHdmiAudioOutput)
|
||||||
|
{
|
||||||
|
var hdmiOutputCard = outputCard as Card.Dmps3DmHdmiAudioOutput;
|
||||||
|
var cecPort = hdmiOutputCard.HdmiOutputPort;
|
||||||
|
AddHdmiOutputPort(number, cecPort);
|
||||||
|
AddDmOutputPort(number);
|
||||||
|
AddAudioOnlyOutputPort(number, "Program");
|
||||||
|
|
||||||
|
var audioOutput = new DmpsAudioOutputController(string.Format("processor-programAudioOutput", number), string.Format("Program Audio Output {0}", number), hdmiOutputCard, hdmiOutputCard.AudioOutputStream);
|
||||||
|
DeviceManager.AddDevice(audioOutput);
|
||||||
|
var digitalAudioOutput = new DmpsAudioOutputController(string.Format("processor-digitalAudioOutput{0}", number), string.Format("Hdmi Audio Output {0}", number), hdmiOutputCard, hdmiOutputCard.DmHdmiOutputStream);
|
||||||
|
DeviceManager.AddDevice(digitalAudioOutput);
|
||||||
|
}
|
||||||
else if (outputCard is Card.Dmps3ProgramOutput)
|
else if (outputCard is Card.Dmps3ProgramOutput)
|
||||||
{
|
{
|
||||||
AddAudioOnlyOutputPort(number, "Program");
|
AddAudioOnlyOutputPort(number, "Program");
|
||||||
@@ -1041,7 +1076,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
else if (args.EventId == DMOutputEventIds.AudioOutEventId)
|
else if (args.EventId == DMOutputEventIds.AudioOutEventId)
|
||||||
{
|
{
|
||||||
if (!Global.ControlSystemIsDmps4kType)
|
if (!Global.ControlSystemIsDmps4k3xxType)
|
||||||
{
|
{
|
||||||
if (outputCard != null && outputCard.AudioOutFeedback != null)
|
if (outputCard != null && outputCard.AudioOutFeedback != null)
|
||||||
{
|
{
|
||||||
@@ -1180,7 +1215,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
if ((sigType & eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
|
if ((sigType & eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
|
||||||
{
|
{
|
||||||
if(!Global.ControlSystemIsDmps4kType)
|
if (!Global.ControlSystemIsDmps4k3xxType)
|
||||||
{
|
{
|
||||||
output.AudioOut = input;
|
output.AudioOut = input;
|
||||||
}
|
}
|
||||||
@@ -1198,7 +1233,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
else if (Dmps.SystemControl.SystemControlType == eSystemControlType.Dmps34K350CSystemControl)
|
else if (Dmps.SystemControl.SystemControlType == eSystemControlType.Dmps34K350CSystemControl)
|
||||||
output.AudioOutSource = eDmps34KAudioOutSource.AirMedia9;
|
output.AudioOutSource = eDmps34KAudioOutSource.AirMedia9;
|
||||||
}
|
}
|
||||||
else if (input.Number <= Dmps.SwitcherInputs.Count)
|
else if (input.Number < Dmps.SwitcherInputs.Count)
|
||||||
{
|
{
|
||||||
//Shift video inputs by 5 for weird DMPS3-4K indexing
|
//Shift video inputs by 5 for weird DMPS3-4K indexing
|
||||||
output.AudioOutSource = (eDmps34KAudioOutSource)(input.Number + 5);
|
output.AudioOutSource = (eDmps34KAudioOutSource)(input.Number + 5);
|
||||||
@@ -1206,7 +1241,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//Shift analog inputs back to inputs 1-5
|
//Shift analog inputs back to inputs 1-5
|
||||||
output.AudioOutSource = (eDmps34KAudioOutSource)(input.Number - Dmps.SwitcherInputs.Count);
|
output.AudioOutSource = (eDmps34KAudioOutSource)(input.Number - Dmps.SwitcherInputs.Count + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1261,7 +1296,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
else if ((sigType & eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
|
else if ((sigType & eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
|
||||||
{
|
{
|
||||||
//Special case for DMPS-4K digital audio output
|
//Special case for DMPS-4K digital audio output
|
||||||
if (Global.ControlSystemIsDmps4kType)
|
if (Global.ControlSystemIsDmps4k3xxType)
|
||||||
{
|
{
|
||||||
if (DigitalAudioOutputs.ContainsKey(outputSelector))
|
if (DigitalAudioOutputs.ContainsKey(outputSelector))
|
||||||
{
|
{
|
||||||
@@ -1269,37 +1304,37 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
DigitalAudioOutputs[outputSelector].ExecuteNumericSwitch(0, 0, eRoutingSignalType.Audio);
|
DigitalAudioOutputs[outputSelector].ExecuteNumericSwitch(0, 0, eRoutingSignalType.Audio);
|
||||||
}
|
}
|
||||||
else if (inputSelector <= Dmps.SwitcherInputs.Count) //DMPS-4K video inputs, set to audio follows video
|
else if (inputSelector < Dmps.SwitcherInputs.Count) //DMPS-4K video inputs, set to audio follows video
|
||||||
{
|
{
|
||||||
DigitalAudioOutputs[outputSelector].ExecuteNumericSwitch(3, 0, eRoutingSignalType.Audio);
|
DigitalAudioOutputs[outputSelector].ExecuteNumericSwitch(3, 0, eRoutingSignalType.Audio);
|
||||||
//Force video route since it is now set so audio follows video
|
//Force video route since it is now set so audio follows video
|
||||||
ExecuteNumericSwitch(inputSelector, outputSelector, eRoutingSignalType.Video);
|
ExecuteNumericSwitch(inputSelector, outputSelector, eRoutingSignalType.Video);
|
||||||
}
|
}
|
||||||
else if (inputSelector == Dmps.SwitcherInputs.Count + 6)
|
else if (inputSelector == Dmps.SwitcherInputs.Count + 5)
|
||||||
{
|
{
|
||||||
//Set to mix 1
|
//Set to mix 1
|
||||||
DigitalAudioOutputs[outputSelector].ExecuteNumericSwitch(1, 0, eRoutingSignalType.Audio);
|
DigitalAudioOutputs[outputSelector].ExecuteNumericSwitch(1, 0, eRoutingSignalType.Audio);
|
||||||
}
|
}
|
||||||
else if (inputSelector == Dmps.SwitcherInputs.Count + 7)
|
else if (inputSelector == Dmps.SwitcherInputs.Count + 6)
|
||||||
{
|
{
|
||||||
//Set to mix 2
|
//Set to mix 2
|
||||||
DigitalAudioOutputs[outputSelector].ExecuteNumericSwitch(2, 0, eRoutingSignalType.Audio);
|
DigitalAudioOutputs[outputSelector].ExecuteNumericSwitch(2, 0, eRoutingSignalType.Audio);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (inputSelector <= (Dmps.SwitcherInputs.Count + 5) && outputSelector <= Dmps.SwitcherOutputs.Count)
|
else if (inputSelector <= (Dmps.SwitcherInputs.Count + 4) && outputSelector <= Dmps.SwitcherOutputs.Count)
|
||||||
{
|
{
|
||||||
var output = Dmps.SwitcherOutputs[outputSelector] as DMOutput;
|
var output = Dmps.SwitcherOutputs[outputSelector] as DMOutput;
|
||||||
if (inputSelector == 0)
|
if (inputSelector == 0)
|
||||||
{
|
{
|
||||||
output.AudioOutSource = eDmps34KAudioOutSource.NoRoute;
|
output.AudioOutSource = eDmps34KAudioOutSource.NoRoute;
|
||||||
}
|
}
|
||||||
else if(inputSelector > Dmps.SwitcherInputs.Count)
|
else if(inputSelector >= (Dmps.SwitcherInputs.Count))
|
||||||
{
|
{
|
||||||
//Shift analog inputs back to inputs 1-5
|
//Shift analog inputs back to inputs 1-5
|
||||||
Debug.Console(1, this, "Attempting analog route input {0} to output {1}", inputSelector - Dmps.SwitcherInputs.Count, outputSelector);
|
Debug.Console(1, this, "Attempting analog route input {0} to output {1}", inputSelector - Dmps.SwitcherInputs.Count + 1, outputSelector);
|
||||||
output.AudioOutSource = (eDmps34KAudioOutSource)(inputSelector - Dmps.SwitcherInputs.Count);
|
output.AudioOutSource = (eDmps34KAudioOutSource)(inputSelector - Dmps.SwitcherInputs.Count + 1);
|
||||||
}
|
}
|
||||||
else if (inputSelector <= Dmps.SwitcherInputs.Count)
|
else if (inputSelector < Dmps.SwitcherInputs.Count)
|
||||||
{
|
{
|
||||||
var input = Dmps.SwitcherInputs[inputSelector] as DMInput;
|
var input = Dmps.SwitcherInputs[inputSelector] as DMInput;
|
||||||
if (input.CardInputOutputType == eCardInputOutputType.Dmps3AirMediaInput || input.CardInputOutputType == eCardInputOutputType.Dmps3AirMediaNoStreamingInput)
|
if (input.CardInputOutputType == eCardInputOutputType.Dmps3AirMediaInput || input.CardInputOutputType == eCardInputOutputType.Dmps3AirMediaNoStreamingInput)
|
||||||
|
|||||||
Reference in New Issue
Block a user