home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
Audio Switcher - easily change audio device via context menu (using remote key)
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Rick164" data-source="post: 1207651" data-attributes="member: 17766"><p>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.</p><p>GUI sounds I'm not sure yet how that works but volume control does so long as it's set to master volume.</p><p></p><p>Snippet of we do now with some extra delays:</p><p></p><p>[code]</p><p> private void SetPlaybackDevice(CoreAudioDevice device)</p><p> {</p><p> try</p><p> {</p><p> Log.Debug($"Audio Switcher - setting default playback device to: {device.FullName}");</p><p> device.SetAsDefault();</p><p> Log.Debug($"Devices audio connected: {GUIGraphicsContext.DeviceAudioConnected}");</p><p></p><p> if (Settings.LAVbitstreamPerDevice)</p><p> {</p><p> SetLavBitstreamSettings(device.FullName);</p><p> }</p><p></p><p> Log.Debug("Resetting volume control");</p><p> Thread.Sleep(1000);</p><p> VolumeHandler.Dispose();</p><p> Thread.Sleep(1000);</p><p> VolumeHandler.CreateInstance();</p><p> Log.Debug("Volume control reset");</p><p></p><p> }</p><p> catch (Exception ex)</p><p> {</p><p> Log.Error("Error occured during SetPlaybackDevice()");</p><p> Log.Error(ex.Message);</p><p> }</p><p> }</p><p>[/code]</p></blockquote><p></p>
[QUOTE="Rick164, post: 1207651, member: 17766"] 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] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Audio Switcher - easily change audio device via context menu (using remote key)
Contact us
RSS
Top
Bottom