Fixing audio and capture permanence

This commit is contained in:
Terry MacDonald 2021-04-21 21:41:36 +12:00
parent d9d84cc66a
commit c0b70cb41c

View File

@ -1332,7 +1332,7 @@ namespace DisplayMagician
// Change Audio Device back (if one specified)
if (activeAudioDevices.Count > 0)
{
if (needToChangeAudioDevice)
if (needToChangeAudioDevice && shortcutToUse.AudioPermanence == ShortcutPermanence.Temporary)
{
logger.Debug($"ShortcutRepository/RunShortcut: Reverting default audio back to {rollbackAudioDevice.Name} audio device");
// use the Audio Device
@ -1363,7 +1363,7 @@ namespace DisplayMagician
// Change Capture Device back (if one specified)
if (activeCaptureDevices.Count > 0)
{
if (needToChangeCaptureDevice)
if (needToChangeCaptureDevice && shortcutToUse.CapturePermanence == ShortcutPermanence.Temporary)
{
logger.Debug($"ShortcutRepository/RunShortcut: Reverting default capture (microphone) device back to {rollbackCaptureDevice.Name} capture device");
// use the Audio Device