Reply to thread

Yeah it's because the volume handler doesn't respawn internally, V4 will force that and while looking in Windows systray can see it changing volume for the correct device depending on what I chose from the AudioSwitcher plugin in Mediaportal.

GUI sounds I'm not sure yet how that works but volume control does so long as it's set to master volume.


Snippet of we do now with some extra delays:


[code]

    private void SetPlaybackDevice(CoreAudioDevice device)

    {

      try

      {

        Log.Debug($"Audio Switcher - setting default playback device to: {device.FullName}");

        device.SetAsDefault();

         Log.Debug($"Devices audio connected: {GUIGraphicsContext.DeviceAudioConnected}");


        if (Settings.LAVbitstreamPerDevice)

        {

          SetLavBitstreamSettings(device.FullName);

        }


        Log.Debug("Resetting volume control");

        Thread.Sleep(1000);

        VolumeHandler.Dispose();

        Thread.Sleep(1000);

        VolumeHandler.CreateInstance();

        Log.Debug("Volume control reset");


      }

      catch (Exception ex)

      {

        Log.Error("Error occured during SetPlaybackDevice()");

        Log.Error(ex.Message);

      }

    }

[/code]


Top Bottom