It is currently March 28th, 2024, 10:27 pm

Visualizer prevents auto-sleeping

Get help with installing and using Rainmeter.
rjlicruz
Posts: 1
Joined: June 6th, 2019, 8:01 pm

Visualizer prevents auto-sleeping

Post by rjlicruz »

The visualizer is constantly triggering my audio driver that is preventing my PC to enter in sleep mode, anyone knows what I can do to maybe hide the visualizer after being not in use or whatever just to enable auto sleep again?
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Visualizer prevents auto-sleeping

Post by balala »

rjlicruz wrote: June 6th, 2019, 8:03 pm The visualizer is constantly triggering my audio driver that is preventing my PC to enter in sleep mode, anyone knows what I can do to maybe hide the visualizer after being not in use or whatever just to enable auto sleep again?
A first possibility is to deactivate the skin whenever it is not in use. This way you can avoid the problem, however next time you want to use it you have to reload it manually. If this solution will be good enough for you, later we can try to find a solution to this problem as well, so first please try it:
Identify the parent AudioLevel plugin measure in your code. That's probably the first plugin measure having the Plugin=AudioLevel option set. All other this kind of measures have to have a Parent=THE-NAME-OF-THE-PARENT-MEASURE option.
If you found the needed measure, add the following options to it:

Code: Select all

DynamicVariables=1
IfCondition=([#CURRENTSECTION#]=0)
IfTrueAction=[!Delay "5000"][!DeactivateConfig]
These options will wait 5 seconds (due to the [!Delay "5000"] bang) then will deactivate (unload) the skin, when the audio level decays to zero.
You can modify the waiting time if you want, replacing the above value. It is expressed into milliseconds.
As I said, the disadvantage of this method is that once the skin unloaded, it is never reloaded, unless you're reloading it manually. It is unloaded even if you pause the music playing or there is a longer silence while playing. We'll try to avoid this cases a little bit later, but first please try what I've described here, to see if this is feasible way to achieve what you want.