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
Support
General Support
[MP1-4838] Volume control no longer functions properly when changing audio device
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="Sebastiii" data-source="post: 1208249" data-attributes="member: 60104"><p>If i'm not wrong the remove/add detection device is on MediaPortal.cs code <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p></p><p>Yeah around line 2203 <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick Out Tongue :p" loading="lazy" data-shortname=":p" /></p><p></p><p>[code=csharp]// special chanding for audio renderer</p><p> if (deviceInterface.dbcc_classguid == KSCATEGORY_RENDER || deviceInterface.dbcc_classguid == RDP_REMOTE_AUDIO || deviceInterface.dbcc_classguid == KSCATEGORY_AUDIO)</p><p> {</p><p> switch (msg.WParam.ToInt32())</p><p> {</p><p> case DBT_DEVICEREMOVECOMPLETE:</p><p> Log.Info("Main: Audio Renderer {0} removed", deviceName);</p><p> try</p><p> {</p><p> GUIGraphicsContext.DeviceAudioConnected--;</p><p> if (_stopOnLostAudioRenderer)</p><p> {</p><p> Log.Debug("Main: Stop playback");</p><p> g_Player.Stop();</p><p> while (GUIGraphicsContext.IsPlaying)</p><p> {</p><p> Thread.Sleep(100);</p><p> }</p><p> }</p><p> }</p><p> catch (Exception exception)</p><p> {</p><p> Log.Warn("Main: Exception on removal Audio Renderer {0} exception: {1} ",deviceName, exception.Message);</p><p> }</p><p> break;</p><p></p><p> case DBT_DEVICEARRIVAL:</p><p> Log.Info("Main: Audio Renderer {0} connected", deviceName);</p><p> try</p><p> {</p><p> GUIGraphicsContext.DeviceAudioConnected++;</p><p> if (_stopOnLostAudioRenderer)</p><p> {</p><p> Log.Debug("Main: Stop playback");</p><p> g_Player.Stop();</p><p> while (GUIGraphicsContext.IsPlaying)</p><p> {</p><p> Thread.Sleep(100);</p><p> }</p><p> }</p><p> // Asynchronously pre-initialize the music engine if we're using the BassMusicPlayer</p><p> if (BassMusicPlayer.IsDefaultMusicPlayer)</p><p> {</p><p> BassMusicPlayer.FreeBass();</p><p> BassMusicPlayer.CreatePlayerAsync();</p><p> }</p><p> }</p><p> catch (Exception exception)</p><p> {</p><p> Log.Warn("Main: Exception on arrival Audio Renderer {0} exception: {1} ", deviceName, exception.Message);</p><p> }</p><p> break;</p><p> }</p><p> }</p><p> }[/code]</p></blockquote><p></p>
[QUOTE="Sebastiii, post: 1208249, member: 60104"] If i'm not wrong the remove/add detection device is on MediaPortal.cs code :) Yeah around line 2203 :P [code=csharp]// special chanding for audio renderer if (deviceInterface.dbcc_classguid == KSCATEGORY_RENDER || deviceInterface.dbcc_classguid == RDP_REMOTE_AUDIO || deviceInterface.dbcc_classguid == KSCATEGORY_AUDIO) { switch (msg.WParam.ToInt32()) { case DBT_DEVICEREMOVECOMPLETE: Log.Info("Main: Audio Renderer {0} removed", deviceName); try { GUIGraphicsContext.DeviceAudioConnected--; if (_stopOnLostAudioRenderer) { Log.Debug("Main: Stop playback"); g_Player.Stop(); while (GUIGraphicsContext.IsPlaying) { Thread.Sleep(100); } } } catch (Exception exception) { Log.Warn("Main: Exception on removal Audio Renderer {0} exception: {1} ",deviceName, exception.Message); } break; case DBT_DEVICEARRIVAL: Log.Info("Main: Audio Renderer {0} connected", deviceName); try { GUIGraphicsContext.DeviceAudioConnected++; if (_stopOnLostAudioRenderer) { Log.Debug("Main: Stop playback"); g_Player.Stop(); while (GUIGraphicsContext.IsPlaying) { Thread.Sleep(100); } } // Asynchronously pre-initialize the music engine if we're using the BassMusicPlayer if (BassMusicPlayer.IsDefaultMusicPlayer) { BassMusicPlayer.FreeBass(); BassMusicPlayer.CreatePlayerAsync(); } } catch (Exception exception) { Log.Warn("Main: Exception on arrival Audio Renderer {0} exception: {1} ", deviceName, exception.Message); } break; } } }[/code] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Support
General Support
[MP1-4838] Volume control no longer functions properly when changing audio device
Contact us
RSS
Top
Bottom