Skip to content

Commit

Permalink
fix: audio switching was bypassing if it was an rx
Browse files Browse the repository at this point in the history
- also cleaned up some logging
  • Loading branch information
ngenovese11 committed Oct 29, 2024
1 parent 7c84c2c commit 6192297
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions src/NvxEpi/Extensions/AudioInputExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,43 +35,37 @@ public static void SetAudioInput(this ICurrentAudioInput device, ushort input)

public static void SetAudioToHdmiInput1(this ICurrentAudioInput device)
{
Debug.Console(1, device, "Switching Audio Input to : 'Hdmi1'");
Debug.Console(1, device, "Switching Audio Input to: 'Hdmi1'");
device.Hardware.Control.AudioSource = DmNvxControl.eAudioSource.Input1;
}

public static void SetAudioToHdmiInput2(this ICurrentAudioInput device)
{
Debug.Console(1, device, "Switching Audio Input to : 'Hdmi2'");
Debug.Console(1, device, "Switching Audio Input to: 'Hdmi2'");
device.Hardware.Control.AudioSource = DmNvxControl.eAudioSource.Input2;
}

public static void SetAudioToInputAnalog(this ICurrentAudioInput device)
{
Debug.Console(1, device, "Switching Audio Input to : 'Analog'");
Debug.Console(1, device, "Switching Audio Input to: 'Analog'");
device.Hardware.Control.AudioSource = DmNvxControl.eAudioSource.AnalogAudio;
}

public static void SetAudioToPrimaryStreamAudio(this ICurrentAudioInput device)
{
if (!device.IsTransmitter)
return;

Debug.Console(1, device, "Switching Audio Input to : 'PrimaryStream'");
Debug.Console(1, device, "Switching Audio Input to: 'PrimaryStream'");
device.Hardware.Control.AudioSource = DmNvxControl.eAudioSource.PrimaryStreamAudio;
}

public static void SetAudioToSecondaryStreamAudio(this ICurrentAudioInput device)
{
if (!device.IsTransmitter)
return;

Debug.Console(1, device, "Switching Audio Input to : 'SecondaryStream/DM NAX'");
Debug.Console(1, device, "Switching Audio Input to: 'SecondaryStream/DM NAX'");
device.Hardware.Control.AudioSource = DmNvxControl.eAudioSource.DmNaxAudio;
}

public static void SetAudioToInputAutomatic(this ICurrentAudioInput device)
{
Debug.Console(1, device, "Switching Audio Input to : 'Automatic'");
Debug.Console(1, device, "Switching Audio Input to: 'Automatic'");
device.Hardware.Control.AudioSource = DmNvxControl.eAudioSource.Automatic;
}

Expand Down

0 comments on commit 6192297

Please sign in to comment.