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
Audio switching bug in Mediaportal 1.12
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="mm1352000" data-source="post: 1142706" data-attributes="member: 82144"><p>I think it looks mostly okay.</p><p></p><p>Sometimes you could use -- or ++ instead of:</p><p>[code]GUIGraphicsContext.DeviceAudioConnected = GUIGraphicsContext.DeviceAudioConnected + 1;[/code]</p><p></p><p>Just a bit shorter. <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>Also, a small tweak:</p><p>[code]public static int DeviceAudioConnected</p><p>{</p><p> get { return _deviceAudioConnected; }</p><p> set</p><p> {</p><p> if (value > _deviceAudioConnected)</p><p> {</p><p> _deviceAudioConnected = value;</p><p> Log.Debug("GraphicContext: device audio connected - Count {0}", _deviceAudioConnected);</p><p> }</p><p> else if (value < _deviceAudioConnected)</p><p> {</p><p> _deviceAudioConnected = value < 0 ? 0 : value;</p><p> Log.Debug("GraphicContext: device audio removed - Count {0}", _deviceAudioConnected);</p><p> }</p><p> }</p><p>}[/code]</p><p></p><p>This fixes:</p><ul> <li data-xf-list-type="ul">don't log if value is not changing (should not happen, but good to handle all possibilities)</li> <li data-xf-list-type="ul">log if device is removed, even if _deviceAudioConnected is 0</li> </ul><p></p><p>It seems the main thing is to finish DetectedFirstAudioStart?</p></blockquote><p></p>
[QUOTE="mm1352000, post: 1142706, member: 82144"] I think it looks mostly okay. Sometimes you could use -- or ++ instead of: [code]GUIGraphicsContext.DeviceAudioConnected = GUIGraphicsContext.DeviceAudioConnected + 1;[/code] Just a bit shorter. :) Also, a small tweak: [code]public static int DeviceAudioConnected { get { return _deviceAudioConnected; } set { if (value > _deviceAudioConnected) { _deviceAudioConnected = value; Log.Debug("GraphicContext: device audio connected - Count {0}", _deviceAudioConnected); } else if (value < _deviceAudioConnected) { _deviceAudioConnected = value < 0 ? 0 : value; Log.Debug("GraphicContext: device audio removed - Count {0}", _deviceAudioConnected); } } }[/code] This fixes: [LIST] [*]don't log if value is not changing (should not happen, but good to handle all possibilities) [*]log if device is removed, even if _deviceAudioConnected is 0 [/LIST] It seems the main thing is to finish DetectedFirstAudioStart? [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Support
General Support
Audio switching bug in Mediaportal 1.12
Contact us
RSS
Top
Bottom