mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 12:06:58 +00:00
update output change event & feedbacks
This commit is contained in:
parent
b457886ee3
commit
3cd8a1f310
1 changed files with 38 additions and 13 deletions
|
|
@ -351,10 +351,19 @@ namespace PepperDash.Essentials.DM
|
||||||
;
|
;
|
||||||
});
|
});
|
||||||
AudioOutputFeedbacks[outputCard.Number] = new IntFeedback(() =>
|
AudioOutputFeedbacks[outputCard.Number] = new IntFeedback(() =>
|
||||||
{
|
{
|
||||||
if (outputCard.AudioOutFeedback != null) { return (ushort)outputCard.AudioOutFeedback.Number; }
|
try
|
||||||
return 0;
|
{
|
||||||
;
|
if (outputCard.AudioOutFeedback != null)
|
||||||
|
{
|
||||||
|
return (ushort) outputCard.AudioOutFeedback.Number;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
catch (NotSupportedException)
|
||||||
|
{
|
||||||
|
return (ushort) outputCard.AudioOutSourceFeedback;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
OutputNameFeedbacks[outputCard.Number] = new StringFeedback(() =>
|
OutputNameFeedbacks[outputCard.Number] = new StringFeedback(() =>
|
||||||
|
|
@ -753,15 +762,31 @@ namespace PepperDash.Essentials.DM
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (args.EventId == DMOutputEventIds.AudioOutEventId)
|
else if (args.EventId == DMOutputEventIds.AudioOutEventId)
|
||||||
{
|
{
|
||||||
if (outputCard != null && outputCard.AudioOutFeedback != null)
|
try
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "DMSwitchAudio:{0} Routed Input:{1} Output:{2}'", this.Name, outputCard.AudioOutFeedback.Number, output);
|
if (outputCard != null && outputCard.AudioOutFeedback != null)
|
||||||
}
|
{
|
||||||
if (AudioOutputFeedbacks.ContainsKey(output))
|
Debug.Console(2, this, "DMSwitchAudio:{0} Routed Input:{1} Output:{2}'", this.Name,
|
||||||
{
|
outputCard.AudioOutFeedback.Number, output);
|
||||||
AudioOutputFeedbacks[output].FireUpdate();
|
}
|
||||||
}
|
if (AudioOutputFeedbacks.ContainsKey(output))
|
||||||
|
{
|
||||||
|
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))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue