mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 05:05:00 +00:00
Changed to use passed in type value for signal type instead of assuming both audio and video
This commit is contained in:
@@ -259,27 +259,27 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(eVst.Auto, null, eRoutingSignalType.Audio | eRoutingSignalType.Video);
|
ExecuteSwitch(eVst.Auto, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(HdmiIn1.Selector, null, eRoutingSignalType.Audio | eRoutingSignalType.Video);
|
ExecuteSwitch(HdmiIn1.Selector, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(HdmiIn2.Selector, null, eRoutingSignalType.Audio | eRoutingSignalType.Video);
|
ExecuteSwitch(HdmiIn2.Selector, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(DisplayPortIn.Selector, null, eRoutingSignalType.Audio | eRoutingSignalType.Video);
|
ExecuteSwitch(DisplayPortIn.Selector, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 4:
|
case 4:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(eVst.AllDisabled, null, eRoutingSignalType.Audio | eRoutingSignalType.Video);
|
ExecuteSwitch(eVst.AllDisabled, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
@@ -294,6 +294,8 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
|
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "Attempting to switch InputSelector {0}", ((eVst)inputSelector).ToString());
|
Debug.Console(2, this, "Attempting to switch InputSelector {0}", ((eVst)inputSelector).ToString());
|
||||||
if ((signalType | eRoutingSignalType.Video) == eRoutingSignalType.Video)
|
if ((signalType | eRoutingSignalType.Video) == eRoutingSignalType.Video)
|
||||||
@@ -306,6 +308,11 @@ namespace PepperDash.Essentials.DM
|
|||||||
Debug.Console(2, this, "Unable to execute audio-only switch for tx {0}", Key);
|
Debug.Console(2, this, "Unable to execute audio-only switch for tx {0}", Key);
|
||||||
//Tx.AudioSource = (eAst)inputSelector;
|
//Tx.AudioSource = (eAst)inputSelector;
|
||||||
}
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.Console(2, this, "Exception in ExecuteSwitch: {0}", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user