I remember hearing of a program which you would leave running in the background and at preset intervals it would check to volume level and reset to a normal volume if it had been changed.

The intresting thing about this program was that between the interval it told windows to put it to sleep or otherwsie ignore it, that way it didn't consume cpu time as it waited. This made it very efficient.

Does anyone know how it did this, or maybe if someone has the source I'll be able to figure it out myself.

Thanks
Posted on 2001-09-02 13:02:05 by Eóin
You could run a loop that does a



invoke Sleep, interval
invoke myVolumeSettingsThingy


this should have the effect of having windows spend as little CPU
time as possible on the app. If it is a GIU app however, I would use
a timer message... otherwise your Sleep call will "hang" the GUI,
unless of course you use multithreading, but... that is too much work
and will end up using more CPU time than necessary :). You can
also set the priority of your process lower, but I dunno how much
advantage this would give.
Posted on 2001-09-02 13:16:25 by f0dder