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
Quality Assurance
Bugreports
Archive
VU meter code - possible error?
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="JimCatMP" data-source="post: 1192293" data-attributes="member: 103549"><p>I noted some time ago VU meters only registers values upto about 10 [version 1.4 -> 1.5, Oct 2013].</p><p></p><p>From SRCS.</p><p></p><p><a href="https://github.com/MediaPortal/MediaPortal-1/blob/master/mediaportal/Core/MusicPlayer/BASS/BassAudioEngine.cs" target="_blank">https://github.com/MediaPortal/MediaPortal-1/blob/master/mediaportal/Core/MusicPlayer/BASS/BassAudioEngine.cs</a></p><p></p><p>----</p><p>public void RMS(out double dbLevelL, out double dbLevelR)</p><p></p><p>snip....</p><p></p><p>level = BassMix.BASS_Mixer_ChannelGetLevel(stream.BassStream);</p><p>}</p><p>}</p><p>if (Config.MusicPlayer != AudioPlayer.Asio) // For Asio, we already got the peaklevel above</p><p>{</p><p>peakL = Un4seen.Bass.Utils.LowWord32(level); // the left level</p><p>peakR = Un4seen.Bass.Utils.HighWord32(level); // the right level</p><p>dbLeft = Un4seen.Bass.Utils.LevelToDB(peakL, 65535);</p><p>dbRight = Un4seen.Bass.Utils.LevelToDB(peakR, 65535);</p><p>}</p><p>dbLevelL = dbLeft;</p><p>dbLevelR = dbRight;</p><p>}</p><p></p><p>---</p><p></p><p>Given that :Un4seen.Bass.Utils.[Low|High]Word32 return max value of 32768 <<a href="http://www.bass.radio42.com/help/html/93156b76-c9f3-f754-4474-c9cac4d29721.htm>" target="_blank">http://www.bass.radio42.com/help/html/93156b76-c9f3-f754-4474-c9cac4d29721.htm></a></p><p></p><p>and Un4seen.Bass.Utils.LevelToDB <<a href="http://www.bass.radio42.com/help/html/b6c55d8c-5a05-3c4c-30b2-18ae4eb45c96.htm>" target="_blank">http://www.bass.radio42.com/help/html/b6c55d8c-5a05-3c4c-30b2-18ae4eb45c96.htm></a> states a Max value of 32768 for stream source [not 65535].</p><p></p><p>If I'm reading this correctly, the dB value returned would be based around source value of effectively 1/2 it's true value and as Vout -> dB is none linear function, it would seem to fit the observed behaviour.</p><p></p><p>Allowing for the fact I'm no C# coder by any means, so I may be missing something blindingly obvious<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite9" alt=":eek:" title="Eek! :eek:" loading="lazy" data-shortname=":eek:" /> in code or in Un4seen documentation.</p><p></p><p>TTFN - JCMP.</p></blockquote><p></p>
[QUOTE="JimCatMP, post: 1192293, member: 103549"] I noted some time ago VU meters only registers values upto about 10 [version 1.4 -> 1.5, Oct 2013]. From SRCS. [URL]https://github.com/MediaPortal/MediaPortal-1/blob/master/mediaportal/Core/MusicPlayer/BASS/BassAudioEngine.cs[/URL] ---- public void RMS(out double dbLevelL, out double dbLevelR) snip.... level = BassMix.BASS_Mixer_ChannelGetLevel(stream.BassStream); } } if (Config.MusicPlayer != AudioPlayer.Asio) // For Asio, we already got the peaklevel above { peakL = Un4seen.Bass.Utils.LowWord32(level); // the left level peakR = Un4seen.Bass.Utils.HighWord32(level); // the right level dbLeft = Un4seen.Bass.Utils.LevelToDB(peakL, 65535); dbRight = Un4seen.Bass.Utils.LevelToDB(peakR, 65535); } dbLevelL = dbLeft; dbLevelR = dbRight; } --- Given that :Un4seen.Bass.Utils.[Low|High]Word32 return max value of 32768 <[URL]http://www.bass.radio42.com/help/html/93156b76-c9f3-f754-4474-c9cac4d29721.htm>[/URL] and Un4seen.Bass.Utils.LevelToDB <[URL]http://www.bass.radio42.com/help/html/b6c55d8c-5a05-3c4c-30b2-18ae4eb45c96.htm>[/URL] states a Max value of 32768 for stream source [not 65535]. If I'm reading this correctly, the dB value returned would be based around source value of effectively 1/2 it's true value and as Vout -> dB is none linear function, it would seem to fit the observed behaviour. Allowing for the fact I'm no C# coder by any means, so I may be missing something blindingly obvious:eek: in code or in Un4seen documentation. TTFN - JCMP. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Quality Assurance
Bugreports
Archive
VU meter code - possible error?
Contact us
RSS
Top
Bottom