CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2009
    Location
    Portland, OR
    Posts
    1,488

    Is thread priority lowered while PC is inactive?

    I witnessed a very strange behavior with my XP Sp3. I have a program I wrote that takes the audio input from waveIn and sends to waveOut (i.e. low-level sound input playback). All that is done through two synchronized threads and everything works fine when PC is active. But when I leave that computer unattended and the screen saver kicks in, after awhile my sound playback gets totally out of whack. Obviously I cannot debug it since then PC becomes active and the program works without a hitch in that mode. (Just as a test I kept moving the mouse cursor once in a while for about an hour and the described issue didn't happen.)

    Does someone know if XP SP3 lowers the thread/process execution priority while machine is idle, and if so how to avoid it?

  2. #2
    Join Date
    Jun 2002
    Location
    Stockholm, Sweden
    Posts
    1,641

    Re: Is thread priority lowered while PC is inactive?

    Hi!

    Do you use a blank screensaver? Otherwise maybe the screen saver is interfering with the audio.

    I have seen some indications in the past that Windows can change the priority of system drivers under some circumstances. I have a low-end system with a USB network dongle that gives a transfer speed of 5MB/s for about 10 seconds, then it drops to 3MB/second because either the driver itself or Windows is manipulating the priorities.
    Nobody cares how it works as long as it works

  3. #3
    Join Date
    Feb 2009
    Location
    Portland, OR
    Posts
    1,488

    Re: Is thread priority lowered while PC is inactive?

    Quote Originally Posted by zerver View Post
    Do you use a blank screensaver?
    No. I use the default XP screensaver and it shouldn't have any sound of its own. Plus what's so confusing for me is that it doesn't happen immediately after screen saver kicks in.

    Quote Originally Posted by zerver View Post
    I have seen some indications in the past that Windows can change the priority of system drivers under some circumstances.
    So did you find any way to stop it or at least to tell it not to do it?

  4. #4
    Join Date
    Jun 2002
    Location
    Stockholm, Sweden
    Posts
    1,641

    Re: Is thread priority lowered while PC is inactive?

    Quote Originally Posted by ahmd View Post
    So did you find any way to stop it or at least to tell it not to do it?
    No, I have not found any solution to this.
    Nobody cares how it works as long as it works

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured