mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 13:15:03 +00:00
update output change event & feedbacks
This commit is contained in:
@@ -352,9 +352,18 @@ namespace PepperDash.Essentials.DM
|
|||||||
});
|
});
|
||||||
AudioOutputFeedbacks[outputCard.Number] = new IntFeedback(() =>
|
AudioOutputFeedbacks[outputCard.Number] = new IntFeedback(() =>
|
||||||
{
|
{
|
||||||
if (outputCard.AudioOutFeedback != null) { return (ushort)outputCard.AudioOutFeedback.Number; }
|
try
|
||||||
|
{
|
||||||
|
if (outputCard.AudioOutFeedback != null)
|
||||||
|
{
|
||||||
|
return (ushort) outputCard.AudioOutFeedback.Number;
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
;
|
}
|
||||||
|
catch (NotSupportedException)
|
||||||
|
{
|
||||||
|
return (ushort) outputCard.AudioOutSourceFeedback;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
OutputNameFeedbacks[outputCard.Number] = new StringFeedback(() =>
|
OutputNameFeedbacks[outputCard.Number] = new StringFeedback(() =>
|
||||||
@@ -753,16 +762,32 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (args.EventId == DMOutputEventIds.AudioOutEventId)
|
else if (args.EventId == DMOutputEventIds.AudioOutEventId)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
if (outputCard != null && outputCard.AudioOutFeedback != null)
|
if (outputCard != null && outputCard.AudioOutFeedback != null)
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "DMSwitchAudio:{0} Routed Input:{1} Output:{2}'", this.Name, outputCard.AudioOutFeedback.Number, output);
|
Debug.Console(2, this, "DMSwitchAudio:{0} Routed Input:{1} Output:{2}'", this.Name,
|
||||||
|
outputCard.AudioOutFeedback.Number, output);
|
||||||
}
|
}
|
||||||
if (AudioOutputFeedbacks.ContainsKey(output))
|
if (AudioOutputFeedbacks.ContainsKey(output))
|
||||||
{
|
{
|
||||||
AudioOutputFeedbacks[output].FireUpdate();
|
AudioOutputFeedbacks[output].FireUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (NotSupportedException)
|
||||||
|
{
|
||||||
|
if (outputCard != null)
|
||||||
|
{
|
||||||
|
Debug.Console(2, this, "DMSwitchAudio:{0} Routed Input:{1} Output:{2}'", Name,
|
||||||
|
outputCard.AudioOutSourceFeedback, output);
|
||||||
|
}
|
||||||
|
if (AudioOutputFeedbacks.ContainsKey(output))
|
||||||
|
{
|
||||||
|
AudioOutputFeedbacks[output].FireUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (args.EventId == DMOutputEventIds.OutputNameEventId
|
else if (args.EventId == DMOutputEventIds.OutputNameEventId
|
||||||
&& OutputNameFeedbacks.ContainsKey(output))
|
&& OutputNameFeedbacks.ContainsKey(output))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user