mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-14 20:24:57 +00:00
Room/DSP things. Pre-testing
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,78 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
using PepperDash.Core;
|
||||||
|
using PepperDash.Essentials.Core;
|
||||||
|
using PepperDash.Essentials.Core.Config;
|
||||||
|
using PepperDash.Essentials.Devices.Common.DSP;
|
||||||
|
using PepperDash.Essentials.DM;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public class EssentialsPresentationVolumesConfig
|
||||||
|
{
|
||||||
|
public EssentialsVolumeLevelConfig Master { get; set; }
|
||||||
|
public EssentialsVolumeLevelConfig Program { get; set; }
|
||||||
|
public EssentialsVolumeLevelConfig AudioCallRx { get; set; }
|
||||||
|
public EssentialsVolumeLevelConfig AudioCallTx { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public class EssentialsVolumeLevelConfig
|
||||||
|
{
|
||||||
|
public string DeviceKey { get; set; }
|
||||||
|
public string Label { get; set; }
|
||||||
|
public int Level { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Helper to get the device associated with key - one timer.
|
||||||
|
/// </summary>
|
||||||
|
public IBasicVolumeWithFeedback GetDevice()
|
||||||
|
{
|
||||||
|
// DM output card format: deviceKey--output~number, dm8x8-1--output~4
|
||||||
|
var match = Regex.Match(DeviceKey, @"([-_\w]+)--(\w+)~(\d+)");
|
||||||
|
if (match.Success)
|
||||||
|
{
|
||||||
|
var devKey = match.Groups[1].Value;
|
||||||
|
var chassis = DeviceManager.GetDeviceForKey(devKey) as DmChassisController;
|
||||||
|
if (chassis != null)
|
||||||
|
{
|
||||||
|
var outputNum = Convert.ToUInt32(match.Groups[3].Value);
|
||||||
|
if (chassis.VolumeControls.ContainsKey(outputNum)) // should always...
|
||||||
|
return chassis.VolumeControls[outputNum];
|
||||||
|
}
|
||||||
|
// No volume for some reason. We have failed as developers
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// DSP format: deviceKey--levelName, biampTesira-1--master
|
||||||
|
match = Regex.Match(DeviceKey, @"([-_\w]+)--(.+)");
|
||||||
|
if (match.Success)
|
||||||
|
{
|
||||||
|
var devKey = match.Groups[1].Value;
|
||||||
|
var dsp = DeviceManager.GetDeviceForKey(devKey) as BiampTesiraForteDsp;
|
||||||
|
if (dsp != null)
|
||||||
|
{
|
||||||
|
var levelTag = match.Groups[2].Value;
|
||||||
|
if (dsp.LevelControlPoints.ContainsKey(levelTag)) // should always...
|
||||||
|
return dsp.LevelControlPoints[levelTag];
|
||||||
|
}
|
||||||
|
// No volume for some reason. We have failed as developers
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -117,6 +117,7 @@
|
|||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Include="Audio\EssentialsVolumeLevelConfig.cs" />
|
||||||
<Compile Include="Configuration ORIGINAL\Builders\TPConfig.cs" />
|
<Compile Include="Configuration ORIGINAL\Builders\TPConfig.cs" />
|
||||||
<Compile Include="Configuration ORIGINAL\Configuration.cs" />
|
<Compile Include="Configuration ORIGINAL\Configuration.cs" />
|
||||||
<Compile Include="Configuration ORIGINAL\ConfigurationHelpers.cs" />
|
<Compile Include="Configuration ORIGINAL\ConfigurationHelpers.cs" />
|
||||||
|
|||||||
Binary file not shown.
@@ -192,9 +192,9 @@ namespace PepperDash.Essentials
|
|||||||
/// <param name="sourceItem"></param>
|
/// <param name="sourceItem"></param>
|
||||||
public void RouteSourceToAllDestinations(SourceListItem sourceItem)
|
public void RouteSourceToAllDestinations(SourceListItem sourceItem)
|
||||||
{
|
{
|
||||||
if (Config.Volumes.ContainsKey("master"))
|
if (Config.Volumes.Master != null)
|
||||||
{
|
{
|
||||||
var audioDev = DeviceManager.GetDeviceForKey(Config.Volumes["master"].DeviceKey);
|
var audioDev = DeviceManager.GetDeviceForKey(Config.Volumes.Master.DeviceKey);
|
||||||
if (audioDev is IBasicVolumeWithFeedback)
|
if (audioDev is IBasicVolumeWithFeedback)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -44,32 +44,10 @@ namespace PepperDash.Essentials
|
|||||||
displaysDict.Add(i++, disp);
|
displaysDict.Add(i++, disp);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Need to assign the volume control point and also audio routing endpoint, if routing
|
// Get the master volume control
|
||||||
// is required: For DSP, typically no.
|
IBasicVolumeWithFeedback masterVolumeControlDev = props.Volumes.Master.GetDevice();
|
||||||
|
|
||||||
IBasicVolumeWithFeedback masterVolumeControlDev = null;
|
#warning Will need to define audio routing somewhere as well
|
||||||
if (props.Volumes.ContainsKey("master"))
|
|
||||||
{
|
|
||||||
var audioConfig = props.Volumes["master"];
|
|
||||||
// need to either get a device or drill down into a device for a card or port
|
|
||||||
|
|
||||||
// Check for DM output port format
|
|
||||||
var match = Regex.Match(audioConfig.DeviceKey, @"([-_\w]+)--(\w+)~(\d+)");
|
|
||||||
if(match.Success)
|
|
||||||
{
|
|
||||||
var devKey = match.Groups[1].Value;
|
|
||||||
var chassis = DeviceManager.GetDeviceForKey(devKey) as DmChassisController;
|
|
||||||
if (chassis != null)
|
|
||||||
{
|
|
||||||
var outputNum = Convert.ToUInt32(match.Groups[3].Value);
|
|
||||||
if (chassis.VolumeControls.ContainsKey(outputNum)) // should always...
|
|
||||||
{
|
|
||||||
masterVolumeControlDev = chassis.VolumeControls[outputNum];
|
|
||||||
Debug.Console(2, "Setting '{0}' as master volume control on room", audioConfig.DeviceKey);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var presRoom = new EssentialsPresentationRoom(Key, Name, displaysDict, masterVolumeControlDev, props);
|
var presRoom = new EssentialsPresentationRoom(Key, Name, displaysDict, masterVolumeControlDev, props);
|
||||||
return presRoom;
|
return presRoom;
|
||||||
@@ -78,12 +56,18 @@ namespace PepperDash.Essentials
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
public class EssentialsRoomPropertiesConfig
|
public class EssentialsRoomPropertiesConfig
|
||||||
{
|
{
|
||||||
public string HelpMessage { get; set; }
|
public string HelpMessage { get; set; }
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
public class EssentialsHuddleRoomPropertiesConfig : EssentialsRoomPropertiesConfig
|
public class EssentialsHuddleRoomPropertiesConfig : EssentialsRoomPropertiesConfig
|
||||||
{
|
{
|
||||||
public string DefaultDisplayKey { get; set; }
|
public string DefaultDisplayKey { get; set; }
|
||||||
@@ -91,6 +75,9 @@ namespace PepperDash.Essentials
|
|||||||
public string SourceListKey { get; set; }
|
public string SourceListKey { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
public class EssentialsPresentationRoomPropertiesConfig : EssentialsRoomPropertiesConfig
|
public class EssentialsPresentationRoomPropertiesConfig : EssentialsRoomPropertiesConfig
|
||||||
{
|
{
|
||||||
public string DefaultAudioBehavior { get; set; }
|
public string DefaultAudioBehavior { get; set; }
|
||||||
@@ -98,19 +85,12 @@ namespace PepperDash.Essentials
|
|||||||
public string DefaultVideoBehavior { get; set; }
|
public string DefaultVideoBehavior { get; set; }
|
||||||
public List<string> DisplayKeys { get; set; }
|
public List<string> DisplayKeys { get; set; }
|
||||||
public string SourceListKey { get; set; }
|
public string SourceListKey { get; set; }
|
||||||
public Dictionary<string, EssentialsVolumeLevelConfig> Volumes { get; set; }
|
public bool HasDsp { get; set; }
|
||||||
|
public EssentialsPresentationVolumesConfig Volumes { get; set; }
|
||||||
|
|
||||||
public EssentialsPresentationRoomPropertiesConfig()
|
public EssentialsPresentationRoomPropertiesConfig()
|
||||||
{
|
{
|
||||||
DisplayKeys = new List<string>();
|
DisplayKeys = new List<string>();
|
||||||
Volumes = new Dictionary<string, EssentialsVolumeLevelConfig>();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class EssentialsVolumeLevelConfig
|
|
||||||
{
|
|
||||||
public string DeviceKey { get; set; }
|
|
||||||
public string Label { get; set; }
|
|
||||||
public int Level { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
3/16/2017 12:22:16 PM, Info: Initializing SIMPLSharp Services...
|
||||||
|
3/16/2017 12:22:16 PM, Info: ProjectInfo successfully initialized.
|
||||||
|
3/16/2017 12:24:22 PM, Info: Terminating SIMPLSharp Services
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
3/16/2017 12:44:48 PM, Info: Initializing SIMPLSharp Services...
|
||||||
|
3/16/2017 12:44:48 PM, Info: ProjectInfo successfully initialized.
|
||||||
|
3/16/2017 12:47:38 PM, Info: Saving project information...
|
||||||
|
3/16/2017 12:47:38 PM, Info: Saving project information...
|
||||||
|
3/16/2017 12:47:38 PM, Info: Saving project information...
|
||||||
|
3/17/2017 12:46:21 PM, Info: Terminating SIMPLSharp Services
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
3/17/2017 9:00:38 AM, Info: Initializing SIMPLSharp Services...
|
||||||
|
3/17/2017 9:00:38 AM, Info: ProjectInfo successfully initialized.
|
||||||
|
3/17/2017 12:46:21 PM, Info: Terminating SIMPLSharp Services
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -10,8 +10,8 @@
|
|||||||
<ArchiveName />
|
<ArchiveName />
|
||||||
</RequiredInfo>
|
</RequiredInfo>
|
||||||
<OptionalInfo>
|
<OptionalInfo>
|
||||||
<CompiledOn>3/15/2017 11:45:10 AM</CompiledOn>
|
<CompiledOn>3/20/2017 7:54:11 AM</CompiledOn>
|
||||||
<CompilerRev>1.0.0.19353</CompilerRev>
|
<CompilerRev>1.0.0.12423</CompilerRev>
|
||||||
</OptionalInfo>
|
</OptionalInfo>
|
||||||
<Plugin>
|
<Plugin>
|
||||||
<Version>Crestron.SIMPLSharp, Version=2.0.48.0, Culture=neutral, PublicKeyToken=812d080f93e2de10</Version>
|
<Version>Crestron.SIMPLSharp, Version=2.0.48.0, Culture=neutral, PublicKeyToken=812d080f93e2de10</Version>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
MainAssembly=PepperDashEssentials.dll:bfe94f76112b33e310c0f6e4484463e2
|
MainAssembly=PepperDashEssentials.dll:36b68cb2a41be892b66878dfa5284633
|
||||||
MainAssemblyMinFirmwareVersion=1.009.0029
|
MainAssemblyMinFirmwareVersion=1.009.0029
|
||||||
MainAssemblyResource=SimplSharpData.dat:820b61c48c8a2cace82957eed4cc377c
|
MainAssemblyResource=SimplSharpData.dat:820b61c48c8a2cace82957eed4cc377c
|
||||||
ü
|
ü
|
||||||
@@ -30,9 +30,9 @@ DependencySource=Crestron.SimplSharpPro.UI.dll:089312a0cb0b4537072d4eb234e71e0e
|
|||||||
DependencyPath=PepperDashEssentials.cpz:Crestron.SimplSharpPro.UI.dll
|
DependencyPath=PepperDashEssentials.cpz:Crestron.SimplSharpPro.UI.dll
|
||||||
DependencyMainAssembly=Crestron.SimplSharpPro.UI.dll:089312a0cb0b4537072d4eb234e71e0e
|
DependencyMainAssembly=Crestron.SimplSharpPro.UI.dll:089312a0cb0b4537072d4eb234e71e0e
|
||||||
ü
|
ü
|
||||||
DependencySource=Essentials Devices Common.dll:22c2d648cf02d3bf28b6c42f461c927f
|
DependencySource=Essentials Devices Common.dll:8c62479abf8cd36d922665ee540cdd85
|
||||||
DependencyPath=PepperDashEssentials.cpz:Essentials Devices Common.dll
|
DependencyPath=PepperDashEssentials.cpz:Essentials Devices Common.dll
|
||||||
DependencyMainAssembly=Essentials Devices Common.dll:22c2d648cf02d3bf28b6c42f461c927f
|
DependencyMainAssembly=Essentials Devices Common.dll:8c62479abf8cd36d922665ee540cdd85
|
||||||
ü
|
ü
|
||||||
DependencySource=EssentialsHttpServer.dll:0666085bdb0856c1d117699c7859bb8c
|
DependencySource=EssentialsHttpServer.dll:0666085bdb0856c1d117699c7859bb8c
|
||||||
DependencyPath=PepperDashEssentials.cpz:EssentialsHttpServer.dll
|
DependencyPath=PepperDashEssentials.cpz:EssentialsHttpServer.dll
|
||||||
@@ -42,9 +42,9 @@ DependencySource=PepperDashCorePortalSync.dll:815e608cb8a8808dab167837cf89b15a
|
|||||||
DependencyPath=PepperDashEssentials.cpz:PepperDashCorePortalSync.dll
|
DependencyPath=PepperDashEssentials.cpz:PepperDashCorePortalSync.dll
|
||||||
DependencyMainAssembly=PepperDashCorePortalSync.dll:815e608cb8a8808dab167837cf89b15a
|
DependencyMainAssembly=PepperDashCorePortalSync.dll:815e608cb8a8808dab167837cf89b15a
|
||||||
ü
|
ü
|
||||||
DependencySource=PepperDash_Core.dll:598033e01568965c3bd67b29e5993374
|
DependencySource=PepperDash_Core.dll:49fe0d78cb676a902c692056067fef4b
|
||||||
DependencyPath=PepperDashEssentials.cpz:PepperDash_Core.dll
|
DependencyPath=PepperDashEssentials.cpz:PepperDash_Core.dll
|
||||||
DependencyMainAssembly=PepperDash_Core.dll:598033e01568965c3bd67b29e5993374
|
DependencyMainAssembly=PepperDash_Core.dll:49fe0d78cb676a902c692056067fef4b
|
||||||
ü
|
ü
|
||||||
DependencySource=PepperDash_Essentials_Core.dll:a3ae2c4b5d2e1890a5788cf717d1b579
|
DependencySource=PepperDash_Essentials_Core.dll:a3ae2c4b5d2e1890a5788cf717d1b579
|
||||||
DependencyPath=PepperDashEssentials.cpz:PepperDash_Essentials_Core.dll
|
DependencyPath=PepperDashEssentials.cpz:PepperDash_Essentials_Core.dll
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user