mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 05:05:00 +00:00
Builds out the rest of the dmps scaled volume inputs
This commit is contained in:
@@ -31,7 +31,7 @@ namespace PepperDash.Essentials.Core.Bridges
|
|||||||
|
|
||||||
[JoinName("MasterVolumeLevelScaledSend")]
|
[JoinName("MasterVolumeLevelScaledSend")]
|
||||||
public JoinDataComplete MasterVolumeLevelScaledSend = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 },
|
public JoinDataComplete MasterVolumeLevelScaledSend = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 },
|
||||||
new JoinMetadata { Description = "Master Volume Scaled Send", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
new JoinMetadata { Description = "Master Volume Scaled Send Enable/Disable", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
[JoinName("SourceVolumeLevel")]
|
[JoinName("SourceVolumeLevel")]
|
||||||
public JoinDataComplete SourceVolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 },
|
public JoinDataComplete SourceVolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 },
|
||||||
@@ -57,6 +57,10 @@ namespace PepperDash.Essentials.Core.Bridges
|
|||||||
public JoinDataComplete SourceVolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 14, JoinSpan = 1 },
|
public JoinDataComplete SourceVolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 14, JoinSpan = 1 },
|
||||||
new JoinMetadata { Description = "Source Volume Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
new JoinMetadata { Description = "Source Volume Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
|
[JoinName("SourceVolumeLevelScaledSend")]
|
||||||
|
public JoinDataComplete SourceVolumeLevelScaledSend = new JoinDataComplete(new JoinData { JoinNumber = 15, JoinSpan = 1 },
|
||||||
|
new JoinMetadata { Description = "Source Volume Scaled Send Enable/Disable", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
[JoinName("Codec1VolumeLevel")]
|
[JoinName("Codec1VolumeLevel")]
|
||||||
public JoinDataComplete Codec1VolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 21, JoinSpan = 1 },
|
public JoinDataComplete Codec1VolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 21, JoinSpan = 1 },
|
||||||
new JoinMetadata { Description = "Codec1 Volume Signed dB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
new JoinMetadata { Description = "Codec1 Volume Signed dB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||||
@@ -81,6 +85,10 @@ namespace PepperDash.Essentials.Core.Bridges
|
|||||||
public JoinDataComplete Codec1VolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 24, JoinSpan = 1 },
|
public JoinDataComplete Codec1VolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 24, JoinSpan = 1 },
|
||||||
new JoinMetadata { Description = "Codec1 Volume Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
new JoinMetadata { Description = "Codec1 Volume Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
|
[JoinName("Codec1VolumeLevelScaledSend")]
|
||||||
|
public JoinDataComplete Codec1VolumeLevelScaledSend = new JoinDataComplete(new JoinData { JoinNumber = 25, JoinSpan = 1 },
|
||||||
|
new JoinMetadata { Description = "Codec1 Volume Scaled Send Enable/Disable", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
[JoinName("Codec2VolumeLevel")]
|
[JoinName("Codec2VolumeLevel")]
|
||||||
public JoinDataComplete Codec2VolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 31, JoinSpan = 1 },
|
public JoinDataComplete Codec2VolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 31, JoinSpan = 1 },
|
||||||
new JoinMetadata { Description = "Codec2 Volume Signed dB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
new JoinMetadata { Description = "Codec2 Volume Signed dB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||||
@@ -105,6 +113,10 @@ namespace PepperDash.Essentials.Core.Bridges
|
|||||||
public JoinDataComplete Codec2VolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 34, JoinSpan = 1 },
|
public JoinDataComplete Codec2VolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 34, JoinSpan = 1 },
|
||||||
new JoinMetadata { Description = "Codec2 Volume Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
new JoinMetadata { Description = "Codec2 Volume Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
|
[JoinName("Codec2VolumeLevelScaledSend")]
|
||||||
|
public JoinDataComplete Codec2VolumeLevelScaledSend = new JoinDataComplete(new JoinData { JoinNumber = 35, JoinSpan = 1 },
|
||||||
|
new JoinMetadata { Description = "Codec2 Volume Scaled Send Enable/Disable", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
[JoinName("MicsMasterVolumeLevel")]
|
[JoinName("MicsMasterVolumeLevel")]
|
||||||
public JoinDataComplete MicsMasterVolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 41, JoinSpan = 1 },
|
public JoinDataComplete MicsMasterVolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 41, JoinSpan = 1 },
|
||||||
new JoinMetadata { Description = "MicsMaster Volume Signed dB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
new JoinMetadata { Description = "MicsMaster Volume Signed dB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||||
@@ -129,6 +141,10 @@ namespace PepperDash.Essentials.Core.Bridges
|
|||||||
public JoinDataComplete MicsMasterVolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 44, JoinSpan = 1 },
|
public JoinDataComplete MicsMasterVolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 44, JoinSpan = 1 },
|
||||||
new JoinMetadata { Description = "MicsMaster Volume Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
new JoinMetadata { Description = "MicsMaster Volume Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
|
[JoinName("MicsMasterVolumeLevelScaledSend")]
|
||||||
|
public JoinDataComplete MicsMasterVolumeLevelScaledSend = new JoinDataComplete(new JoinData { JoinNumber = 45, JoinSpan = 1 },
|
||||||
|
new JoinMetadata { Description = "Mics Master Volume Scaled Send Enable/Disable", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructor to use when instantiating this Join Map without inheriting from it
|
/// Constructor to use when instantiating this Join Map without inheriting from it
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
void BaseDevice_DMOutputChange(Switch device, DMOutputEventArgs args)
|
void BaseDevice_DMOutputChange(Switch device, DMOutputEventArgs args)
|
||||||
{
|
{
|
||||||
|
Debug.Console(2, this, "Dmps Audio Controller Event Output: {0} EventId: {1}", args.Number, args.EventId.ToString());
|
||||||
switch (args.EventId)
|
switch (args.EventId)
|
||||||
{
|
{
|
||||||
case DMOutputEventIds.MasterVolumeFeedBackEventId:
|
case DMOutputEventIds.MasterVolumeFeedBackEventId:
|
||||||
@@ -205,7 +206,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
var muteOffJoin = joinStart + 1;
|
var muteOffJoin = joinStart + 1;
|
||||||
var volumeUpJoin = joinStart + 2;
|
var volumeUpJoin = joinStart + 2;
|
||||||
var volumeDownJoin = joinStart + 3;
|
var volumeDownJoin = joinStart + 3;
|
||||||
var volumeLevelScaledSendJoin = joinStart + 4;
|
var sendScaledVolumeJoin = joinStart + 4;
|
||||||
|
|
||||||
output.VolumeLevelFeedback.LinkInputSig(trilist.UShortInput[volumeLevelJoin]);
|
output.VolumeLevelFeedback.LinkInputSig(trilist.UShortInput[volumeLevelJoin]);
|
||||||
output.VolumeLevelScaledFeedback.LinkInputSig(trilist.UShortInput[volumeLevelScaledJoin]);
|
output.VolumeLevelScaledFeedback.LinkInputSig(trilist.UShortInput[volumeLevelScaledJoin]);
|
||||||
@@ -217,7 +218,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
trilist.SetBoolSigAction(volumeUpJoin, output.VolumeUp);
|
trilist.SetBoolSigAction(volumeUpJoin, output.VolumeUp);
|
||||||
trilist.SetBoolSigAction(volumeDownJoin, output.VolumeDown);
|
trilist.SetBoolSigAction(volumeDownJoin, output.VolumeDown);
|
||||||
trilist.SetBoolSigAction(volumeLevelScaledJoin, output.SendScaledVolume);
|
trilist.SetBoolSigAction(sendScaledVolumeJoin, output.SendScaledVolume);
|
||||||
trilist.SetUShortSigAction(volumeLevelJoin, output.SetVolume);
|
trilist.SetUShortSigAction(volumeLevelJoin, output.SetVolume);
|
||||||
trilist.SetUShortSigAction(volumeLevelScaledJoin, output.SetVolumeScaled);
|
trilist.SetUShortSigAction(volumeLevelScaledJoin, output.SetVolumeScaled);
|
||||||
}
|
}
|
||||||
@@ -260,8 +261,8 @@ namespace PepperDash.Essentials.DM
|
|||||||
eDmpsLevelType Type;
|
eDmpsLevelType Type;
|
||||||
UShortInputSig Level;
|
UShortInputSig Level;
|
||||||
|
|
||||||
private bool VolumeLevelScaledSend;
|
private bool EnableVolumeSend;
|
||||||
private ushort VolumeLevelScaled;
|
private ushort VolumeLevelInput;
|
||||||
protected short MinLevel { get; set; }
|
protected short MinLevel { get; set; }
|
||||||
protected short MaxLevel { get; set; }
|
protected short MaxLevel { get; set; }
|
||||||
|
|
||||||
@@ -277,8 +278,8 @@ namespace PepperDash.Essentials.DM
|
|||||||
public DmpsAudioOutput(Card.Dmps3OutputBase output, eDmpsLevelType type)
|
public DmpsAudioOutput(Card.Dmps3OutputBase output, eDmpsLevelType type)
|
||||||
{
|
{
|
||||||
Output = output;
|
Output = output;
|
||||||
VolumeLevelScaled = 0;
|
VolumeLevelInput = 0;
|
||||||
VolumeLevelScaledSend = false;
|
EnableVolumeSend = false;
|
||||||
Type = type;
|
Type = type;
|
||||||
MinLevel = -800;
|
MinLevel = -800;
|
||||||
MaxLevel = 100;
|
MaxLevel = 100;
|
||||||
@@ -307,7 +308,6 @@ namespace PepperDash.Essentials.DM
|
|||||||
MuteOffAction = new Action(Output.MicMasterMuteOff);
|
MuteOffAction = new Action(Output.MicMasterMuteOff);
|
||||||
VolumeUpAction = new Action<bool>((b) => Output.MicMasterLevelUp.BoolValue = b);
|
VolumeUpAction = new Action<bool>((b) => Output.MicMasterLevelUp.BoolValue = b);
|
||||||
VolumeDownAction = new Action<bool>((b) => Output.MicMasterLevelDown.BoolValue = b);
|
VolumeDownAction = new Action<bool>((b) => Output.MicMasterLevelDown.BoolValue = b);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case eDmpsLevelType.Source:
|
case eDmpsLevelType.Source:
|
||||||
@@ -336,7 +336,6 @@ namespace PepperDash.Essentials.DM
|
|||||||
MuteOffAction = new Action(programOutput.Codec1MuteOff);
|
MuteOffAction = new Action(programOutput.Codec1MuteOff);
|
||||||
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
|
||||||
{
|
{
|
||||||
@@ -367,7 +366,6 @@ namespace PepperDash.Essentials.DM
|
|||||||
MuteOffAction = new Action(programOutput.Codec2MuteOff);
|
MuteOffAction = new Action(programOutput.Codec2MuteOff);
|
||||||
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
|
||||||
{
|
{
|
||||||
@@ -396,10 +394,10 @@ 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());
|
Debug.Console(2, Debug.ErrorLogLevel.None, "Scaling DMPS volume:{0} level:{1} min:{2} max:{3}", Output.Name, level.ToString(), MinLevel.ToString(), MaxLevel.ToString());
|
||||||
VolumeLevelScaled = (ushort)(level * (MaxLevel - MinLevel) / ushort.MaxValue + MinLevel);
|
VolumeLevelInput = (ushort)(level * (MaxLevel - MinLevel) / ushort.MaxValue + MinLevel);
|
||||||
if (VolumeLevelScaledSend == true)
|
if (EnableVolumeSend == true)
|
||||||
{
|
{
|
||||||
Level.UShortValue = VolumeLevelScaled;
|
Level.UShortValue = VolumeLevelInput;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -412,10 +410,10 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
public void SendScaledVolume(bool pressRelease)
|
public void SendScaledVolume(bool pressRelease)
|
||||||
{
|
{
|
||||||
VolumeLevelScaledSend = pressRelease;
|
EnableVolumeSend = pressRelease;
|
||||||
if(pressRelease == false)
|
if (pressRelease == false)
|
||||||
{
|
{
|
||||||
Level.UShortValue = VolumeLevelScaled;
|
SetVolumeScaled(VolumeLevelInput);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user