It is currently July 23rd, 2024, 7:35 am

Low Update value on the example code of AudioLevel plugin

Discussions about the documentation, main Rainmeter site and forums.
User avatar
balala
Rainmeter Sage
Posts: 16418
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Low Update value on the example code of AudioLevel plugin

Post by balala »

Probably this is not a huge problem, but I think it worth to mention it. In the AudioLevel plugin help page, the first example code has the Update set to 15. But as we know, the lowest possible value of this option is 16. This can be confusing, especially for the beginners, so maybe should be fixed.
User avatar
Brian
Developer
Posts: 2713
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Low Update value on the example code of AudioLevel plugin

Post by Brian »

I think the default timer resolution for Windows is 15.6ms (or 15.625ms for some systems). While this is the default value that Windows uses, it is possible that a program can adjust this value to a lower resolution. Obviously that would be a bad thing for power consumption, but there are some programs that do it (even Microsoft programs).

To check your timer resolution run this:
https://live.sysinternals.com/Clockres.exe (32-bit)
https://live.sysinternals.com/Clockres64.exe (64-bit)

Or you can run the following command that will give you a report of any power issues: powercfg -energy duration 5

In the future, Rainmeter could use other types of timers to allow for lower resolution - however, we don't think it is necessary at this time.

Docs have been updated:
https://docs.rainmeter.net/manual/plugins/audiolevel/
https://docs.rainmeter.net/manual-beta/plugins/audiolevel/

-Brian
User avatar
balala
Rainmeter Sage
Posts: 16418
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Low Update value on the example code of AudioLevel plugin

Post by balala »

Thanks for the details. Despite I do write sometimes simpler apps, I'm not a programmer, so I'll never try to do such adjustments and those I think are not required or possible for the majority of us.
I just discovered the Update=15 value in that example code and reported it. Now that's fixed, probably the problem is solved. Thanks.