mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 13:15:03 +00:00
working on DmpsAudioOutputControllerBridge
This commit is contained in:
@@ -206,8 +206,10 @@ namespace PepperDash.Essentials.Bridges
|
||||
|
||||
public class DmChassisControllerJoinMap : JoinMapBase
|
||||
{
|
||||
//Digital
|
||||
// Digtal/Analog
|
||||
public uint SystemId { get; set; }
|
||||
|
||||
//Digital
|
||||
public uint IsOnline { get; set; }
|
||||
public uint OutputUsb { get; set; }
|
||||
public uint InputUsb { get; set; }
|
||||
@@ -233,7 +235,9 @@ namespace PepperDash.Essentials.Bridges
|
||||
|
||||
public DmChassisControllerJoinMap()
|
||||
{
|
||||
SystemId = 10;
|
||||
//Digital/Analog
|
||||
SystemId = 10; // Analog sets/gets SystemId, digital input applies and provides feedback of ID change busy
|
||||
|
||||
//Digital
|
||||
IsOnline = 11;
|
||||
VideoSyncStatus = 100; //101-299
|
||||
@@ -261,8 +265,6 @@ namespace PepperDash.Essentials.Bridges
|
||||
OutputEndpointOnline = 700; //701-899
|
||||
HdcpSupportState = 1000; //1001-1199
|
||||
HdcpSupportCapability = 1200; //1201-1399
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override void OffsetJoinNumbers(uint joinStart)
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using Crestron.SimplSharpPro.DM;
|
||||
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.DM;
|
||||
|
||||
namespace PepperDash.Essentials.Bridges
|
||||
{
|
||||
public static class DmpsAudioOutputControllerApiExtensions
|
||||
{
|
||||
public static void LinkToApi(this DmpsAudioOutputController dmAudioOutputController, BasicTriList trilis, uint joinStart, string joinMapKey)
|
||||
{
|
||||
var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as DmpsAudioOutputControllerJoinMap;
|
||||
|
||||
if (joinMap == null)
|
||||
joinMap = new DmpsAudioOutputControllerJoinMap();
|
||||
|
||||
joinMap.OffsetJoinNumbers(joinStart);
|
||||
|
||||
Debug.Console(1, dmAudioOutputController, "Linking to Trilist '{0}'", trilis.ID.ToString("X"));
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class DmpsAudioOutputControllerJoinMap: JoinMapBase
|
||||
{
|
||||
// Digital
|
||||
public uint MasterVolumeMute { get; set; }
|
||||
public uint SourceVolumeMute { get; set; }
|
||||
public uint Codec1VolumeMute { get; set; }
|
||||
public uint Codec2VolumeMute { get; set; }
|
||||
|
||||
|
||||
public DmpsAudioOutputControllerJoinMap()
|
||||
{
|
||||
MasterVolumeMute = 1; // 1-10
|
||||
SourceVolumeMute = 11; // 11-20
|
||||
Codec1VolumeMute = 21; // 21-30
|
||||
Codec2VolumeMute = 31; // 31-40
|
||||
}
|
||||
|
||||
public override void OffsetJoinNumbers(uint joinStart)
|
||||
{
|
||||
var joinOffset = joinStart -1;
|
||||
|
||||
MasterVolumeMute = MasterVolumeMute + joinOffset;
|
||||
SourceVolumeMute = SourceVolumeMute + joinOffset;
|
||||
Codec1VolumeMute = Codec1VolumeMute + joinOffset;
|
||||
Codec2VolumeMute = Codec2VolumeMute + joinOffset;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -139,7 +139,7 @@ namespace PepperDash.Essentials.Bridges
|
||||
|
||||
|
||||
public DmpsRoutingControllerJoinMap()
|
||||
{;
|
||||
{
|
||||
OutputVideo = 100; //101-299
|
||||
OutputAudio = 300; //301-499
|
||||
VideoSyncStatus = 100; //101-299
|
||||
@@ -148,8 +148,8 @@ namespace PepperDash.Essentials.Bridges
|
||||
OutputCurrentVideoInputNames = 2000; //2001-2199
|
||||
OutputCurrentAudioInputNames = 2200; //2201-2399
|
||||
InputCurrentResolution = 2400; // 2401-2599
|
||||
InputEndpointOnline = 500;
|
||||
OutputEndpointOnline = 700;
|
||||
InputEndpointOnline = 500; //501-699
|
||||
OutputEndpointOnline = 700; //701-899
|
||||
//HdcpSupport = 1000; //1001-1199
|
||||
//HdcpSupportCapability = 1200; //1201-1399
|
||||
|
||||
|
||||
@@ -121,6 +121,7 @@
|
||||
<Compile Include="Bridges\BridgeFactory.cs" />
|
||||
<Compile Include="Bridges\CameraControllerBridge.cs" />
|
||||
<Compile Include="Bridges\AirMediaControllerBridge.cs" />
|
||||
<Compile Include="Bridges\DmpsAudioOutputControllerBridge.cs" />
|
||||
<Compile Include="Bridges\DmpsRoutingControllerBridge.cs" />
|
||||
<Compile Include="Bridges\DisplayControllerBridge.cs" />
|
||||
<Compile Include="Bridges\DigitalLoggerBridge.cs" />
|
||||
|
||||
@@ -26,7 +26,6 @@ namespace PepperDash.Essentials.DM
|
||||
public DmpsAudioOutput SourceVolumeLevel { get; private set; }
|
||||
public DmpsAudioOutput Codec1VolumeLevel { get; private set; }
|
||||
public DmpsAudioOutput Codec2VolumeLevel { get; private set; }
|
||||
public Dictionary<int, DmpsAudioOutput> MicVolumeLevels { get; private set; }
|
||||
|
||||
public DmpsAudioOutputController(string key, string name, Card.Dmps3OutputBase card)
|
||||
: base(key, name)
|
||||
@@ -51,6 +50,7 @@ namespace PepperDash.Essentials.DM
|
||||
{
|
||||
Codec1VolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Codec1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void BaseDevice_DMOutputChange(Switch device, DMOutputEventArgs args)
|
||||
@@ -111,6 +111,8 @@ 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;
|
||||
@@ -120,6 +122,8 @@ namespace PepperDash.Essentials.DM
|
||||
{
|
||||
Output = output;
|
||||
|
||||
Type = type;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case eDmpsLevelType.Master:
|
||||
@@ -224,6 +228,13 @@ namespace PepperDash.Essentials.DM
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
var numberOfMics = Global.ControlSystem.NumberOfMicrophones;
|
||||
|
||||
for (int i = 1; i <= numberOfMics; i++)
|
||||
{
|
||||
// Construct each mic level here
|
||||
}
|
||||
}
|
||||
|
||||
#region IBasicVolumeWithFeedback Members
|
||||
@@ -274,6 +285,7 @@ namespace PepperDash.Essentials.DM
|
||||
Source,
|
||||
MicsMaster,
|
||||
Codec1,
|
||||
Codec2
|
||||
Codec2,
|
||||
Mic
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user