Sound Keeper v1.3.0 [2022/07/28]

Prevents SPDIF/HDMI digital audio playback devices from sleeping. Uses WASAPI, requires Windows 7+.

To enable autorun, copy soundkeeper.exe into the startup directory (to open it, press Win+R, enter shell:startup, press Enter). To close the program, just mute the Sound Keeper in the Volume Mixer or kill the soundkeeper.exe process.

Download: soundkeeper.7z (23KB). Source code →

Features

  • Sound Keeper is fully automatic and doesn't require any user interaction.
  • Sound Keeper can keep sound on many sound outputs simultaneously (e.g. SPDIF and HDMI).
  • Sound Keeper detects new sound outputs on the fly (e.g. when you connected a TV via HDMI).

Settings

  • Default behavior can be changed by changing file name of the Sound Keeper executable.
  • Primary audio output is used by default. Add All to executable file name to enable Sound Keeper on all outputs.
  • Inaudible stream is used by default. Add Zero to executable file name to use stream of digital zeroes (like it was in v1.0.0).

If the default inaudible stream doesn't help, try the new Sine stream type. It generates a sine wave, and can be customized. There are two parameters: F (frequency) and A (amplitude). The value goes right after the parameter character. For example, add SineF10A5 to executable file name to generate 10Hz sine wave with 5% amplitude. Low frequencies (below 20Hz) and high frequencies (above 20000Hz) with low amplitude (up to 10%) are inaudible.

Sound Keeper vs. SPDIF Keep Alive vs. SPDIF-KA

Sound Keeper v1.0 SPDIF Keep Alive v1.2 SPDIF-KA v1.4
Fully automatic: Yes No No
Multiple outputs: Yes No No
GUI: No Yes Yes
Requires .NET: No Yes Yes
Executable size: 17KB 668KB 163KB
CPU usage (on Intel Core i5 4460): 0.004% 0.06% 0.06%
RAM usage (Private Working Set): 1636KB 13704KB 10600KB

Known issue: streaming audio prevents automatic sleep mode

When a program streams any audio (even silence), the system don't go into sleep mode automatically. Sound Keeper uses the NtPowerInformation(SystemPowerInformation, ...) function to retrieve time when system is going to sleep, and disables itself right before this time. On Windows 7, it works perfectly. Windows 10 waits for 2 minutes more after any sound was streamed, so the PC goes into sleep mode after 2 minutes when Sound Keeper disabled itself. For some reason, Windows 11 always reports that the system is going to sleep in 0 seconds. So, the workaround had to be disabled on this OS until a better solution is found. You can try to use the powercfg to workaround this issue at the system level. Details →

  1. #201
    VEG Author

    Jonathan,

    Can I make a feature suggestion - would be useful to specify a time range for it to disable itself during that time (e.g. to let the soundbar sleep overnight if leaving the computer on).

    I think you could try to use the standard Windows Task Scheduler for this.

  2. #202
    JamesF

    So with regard to the wake lock situation - I'm using SoundKeeper in "Zero" mode because I found the default "inaudible" stream was in fact very audible when turning my system all the way up to listen to music. (I have a HTPC with a pretty powerful theater system.)

    When I run powercfg /requests (and I'm on Win11) I don't see any wake locks. If I start a YouTube video, I will see Chrome in there, so I know it's working. But with nothing but SoundKeeper64Zero.exe running, I have no wake locks.

    And yet my system will not go to sleep anyway.

    Thinking it was the "Zero" mode preventing anything from showing up in the wake locks, I tried running just the regular SoundKeeper64.exe but that didn't actually change anything.

    What could be going on here?

  3. #203
    VEG Author

    I'm using SoundKeeper in "Zero" mode because I found the default "inaudible" stream was in fact very audible when turning my system all the way up to listen to music.

    Amplitude is just 0.0000305185 in default mode when audio output is 16-bit, and it just can't be audible. Probably, some enhancements are enabled in the audio output settings? It might be that Loudness Equalization makes it much louder. What bit-depth is used for your audio output? Is there any difference if you try to switch between 16-bit/24-bit/32-bit? Maybe there is a bug in handling different bit-depths.

    When I run powercfg /requests (and I'm on Win11) I don't see any wake locks. If I start a YouTube video, I will see Chrome in there, so I know it's working. But with nothing but SoundKeeper64Zero.exe running, I have no wake locks.
    And yet my system will not go to sleep anyway.

    The suggestions about powercfg /requests were tested on Windows 10 only. I don't use Windows 11. Probably there are some behavior changes in Windows 11 I'm not aware of.

  4. #204
    VEG Author

    The debug and beta versions are updated. Fluctuate stream makes just one fluctuation per a second by default now. It should be inaudible even with the Loudness Equalization enabled. Also I added an ability to set frequency for the Fluctuate stream.

    It would be good if you help to find the reason why the old Fluctuate is audible for you. Set F to 0 to enable the old behavior (if you use the new beta or debug versions), and try to tweak with your audio output settings (changing bit depth and sample rate; toggling enhancements) to figure out if they affect audibility of this stream type on your system.

  5. #205
    JamesF

    Amplitude is just 0.0000305185 in default mode when audio output is 16-bit, and it just can't be audible. Probably, some enhancements are enabled in the audio output settings? It might be that Loudness Equalization makes it much louder. What bit-depth is used for your audio output? Is there any difference if you try to switch between 16-bit/24-bit/32-bit? Maybe there is a bug in handling different bit-depths.

    I was running at 16 bit, 48kHz. All enhancements are disabled. I switched to 24 bit, 48kHz and the noise went away. SoundKeeper64.exe is now indistinguishable from SoundKeeper64Zero.exe.

    I should note that I'm running a 7.1 channel system with about 2kW of power. So when turned up, things that are inaudible on many setups are audible on mine. I hear things like faint background noise in recordings that sound silent when listening on other devices. This noise was audible to me at 15dB below "reference" level, but seemed to fade out at -20dB. (I'm using a Denon AVR to set my volume.)

    The suggestions about powercfg /requests were tested on Windows 10 only. I don't use Windows 11. Probably there are some behavior changes in Windows 11 I'm not aware of.

    Ah, okay. Perhaps my situation is not unique then. I'd really love to find a way to get Windows 11 to sleep automatically with SoundKeeper active. I picked Windows 11 over 10 (despite my bias) because of the supposedly superior HDR video capabilities. As of right now, I must manually put my HTPC to sleep and it's a tough thing to remember after years of letting it handle that by itself. :) This new HTPC only draws about 30W of power at idle, but all the same I like to use sleep mode to keep the dust down and reduce wear and tear on the fans.

    Thanks for the feedback!

  6. #206
    VEG Author

    JamesF,

    I was running at 16 bit, 48kHz. All enhancements are disabled. I switched to 24 bit, 48kHz and the noise went away. SoundKeeper64.exe is now indistinguishable from SoundKeeper64Zero.exe.

    Interesting. Did you try the beta? Do you hear anything in the new default mode when 16-bit output is used?

  7. #207
    JamesF

    Interesting. Did you try the beta? Do you hear anything in the new default mode when 16-bit output is used?

    The beta did seem to resolve the issue in 16 bit 48kHz mode.

  8. #208
    VEG Author

    Thanks. Now I need somebody for whom Zero doesn't work, but the old Fluctuate worked fine, so we could check if the new Fluctuate still works for them =)

    Related to the going into sleep mode. You could just assign a convenient shortcuts for Sleep and Hibernate, and use them when you need. For example, the standard shortcut for locking computer is Win+L. I just added Ctrl+Win+L for sleeping and Ctrl+Shift+Win+L for hibernation using AutoHotKey:

    ; ------------------------------------------------------------------------------
    ; Sleep (Ctrl+Win+L) and Hibernate (Ctrl+Shift+Win+L) hotkeys.
    ; ------------------------------------------------------------------------------
    
    ^#L UP::DllCall("PowrProf\SetSuspendState", "int", 0, "int", 0, "int", 0)
    ^+#L UP::DllCall("PowrProf\SetSuspendState", "int", 1, "int", 0, "int", 0)
    
    ; ------------------------------------------------------------------------------

    Before I was always locking my computer using Win+L anyway. Now I just press Ctrl in addition when I know that I go somewhere and want it to be in sleep state to save some energy.

  9. #209
    JamesF

    Related to the going into sleep mode. You could just assign a convenient shortcuts for Sleep and Hibernate, and use them when you need.

    My HTPC keyboard actually has a dedicated sleep button that's easy to find and press even in the dark, so that isn't an issue so much as my forgetfulness.

    I'd really like to figure out a way around this problem. Right now, it's looking like my only option if I want to have automatic sleep is to install an nVidia graphics card and use NVCleanstall to keep the HDMI output from sleeping.

    Back on the wavelength of

    powercfg -requests

    - I've noticed that although SoundKeeper64.exe doesn't show up here, when I play audio in Chrome, it definitely does:

    C:\Windows\system32>powercfg -requests
    DISPLAY:
    None.
    
    SYSTEM:
    None.
    
    AWAYMODE:
    None.
    
    EXECUTION:
    [PROCESS] \Device\HarddiskVolume3\Program Files\Google\Chrome\Application\chrome.exe
    Playing audio
    
    PERFBOOST:
    None.
    
    ACTIVELOCKSCREEN:
    None.

    What could be preventing SoundKeeper64.exe from showing up here?

  10. #210
    VEG Author

    I have no idea. Maybe there are some additions to the WASAPI and I need to pass some new flag to become visible there, but I didn't find anything related to this. I found a flag to hide the program from the system audio mixer =) One day in the future I'll install Windows 11 to experiment with it and try to figure out what to do with this, but it won't be soon.

    Is Sound Keeper not visible there even when it plays audible sound like SineF1000A50?

  11. #211
    JamesF

    Tried that and confirmed it didn't make a difference as to what shows up in

    powercfg -requests

    . I'm at a loss, because it's clearly making a racket. :D

    Both regular SoundKeeper64.exe and SoundKeeper64SineF1000A50.exe show up in the system sound mixer.

  12. #212
    JamesF

    I'm curious, do you think it would be possible to make Sound Keeper detect how long it's been since the last user input and automatically mute/stop streaming?

    My research turned up the GetLastInputInfo function:

    https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getlastinputinfo

    Apparently it's not very useful by itself, you have to compare it to the output of TickCount as described here:

    https://stackoverflow.com/questions/1037595/c-sharp-detect-time-of-last-user-interaction-with-the-os

    Failing that, perhaps it is possible to detect that the console is locked or the monitor is off? I have my machine setup to show the screen saver at 9 minutes (which locks the console) and then the monitor sleeps at 10 minutes. That works with SoundKeeper.exe running, it seems to only affect the sleep timer.

  13. #213
    tom

    hi, Thanks for this, greatly appreciated.

    Have had some good/mixed results with the constant or fluctuating sound. currently working but with a somewhat disctracting hiss..

    So my ideal would be 2 seconds of this hiss every 13 minutes

    I saw in readme the parameters -L (length) and -W (wait time interval): tried this with v.1.2.2 but didn't work:
    in cmd console

    soundkeeper32.exe sine -f400 -a 5 -l 2 -w 5

    Is there an old version .exe download with the -W and -L paramenters, that i can try?

    (windows 10 64bit; Hisense HS214)

  14. #214
    VEG Author

    tom, these new settings are available in the beta version only yet. Fluctuate is also different there now. Please test if you can hear it.

    JamesF, yeah, I was looking through these functions also. Maybe in the future I'll add some additional settings for this.

  15. #215
    HellsAngel

    Hi,
    Im on Sound Keeper v1.2.2 and inaudible audio when quiet i can still hear this kinda high pitch sound ive tried zero mode this works most of the time
    it is quiet but its not 100% reliable at keeping it awake. pc is connected to a denon avr if i dont use this and just tv speakers i cant hear the inaudible sound but i barely use that. is there another thing i could try?

    Thanks in advance.

  16. #216
    VEG Author

    HellsAngel, try the new beta version. The default inaudible mode is updated there, please check if it works for you. Also, you can specify periodicity (e.g. making a short inaudible sound every 10 minutes).

  17. #217
    HellsAngel

    Thanks will try it right away, that periodicity thats a nice feature to have aswell.

  18. #218
    VEG Author

    Sound Keeper v1.3.0

    • Fluctuate is 1 fluctuation per second by default. Frequency can be changed using the F parameter.
    • Periodic playing of a sound (parameters L and W) with optional fading (parameter T).
    • New White, Brown, and Pink noise signal types.
    • Self kill command is added. Run soundkeeper kill to stop running Sound Keeper instance.
    • Analog switch was added. It works as the opposite of Digital.
    • Ignores remote desktop audio device (this feature can be disabled using the Remote switch).
    • New OpenOnly mode that just opens audio output, but doesn't stream anything.
    • New NoSleep switch which disables PC sleep detection (Windows 7-10).
    • Work as a dummy when no suitable devices found.
    • Sound Keeper shouldn't prevent PC from automatic going into sleep mode on Windows 10.
    • The program is not confused anymore when PC auto sleep is disabled on Windows 10.
    • The workaround that allowed PC to auto sleep had to be disabled on Windows 11.

    Thanks to AnaLogiC76 for the ideas and code of OpenOnly and NoSleep.

  19. #219
    VEG Author

    HellsAngel, so, does the new version of the Fluctuate stream work for you? Is it better than Zero?

  20. #220
    HellsAngel

    Hi,
    I just ran the new version been up and running ever since i grabbed it few days ago with just the default sofar havent ran in the high pitch sound.
    If it happens again ill try fluctuate as that seems very promising on solving that.
    i thought i could replicate the issue ie gsync or so causing it as when i killed soundkeeper the high pitch was gone before killing it was also take like
    1 to 2 seconds to do that after a video stopped playing or anything that made sound.

    Thanks again for the app and support.

  21. #221
    VEG Author

    HellsAngel,

    If it happens again ill try fluctuate as that seems very promising on solving that.

    The FluctuateF1 is the default mode now. Did you check if Zero or OpenOnly helps?

  22. #222
    HellsAngel

    No i havent checked those just ran default its been running several days now sofar so good.

  23. #223
    VEG Author

    HellsAngel, it would be nice if you check Zero and OpenOnly modes also, just out of curiosity.

  24. #224
    HellsAngel

    Ok ive quickly checked
    SoundKeeper64Zero > this works cant hear anything and audio doesnt goto sleep
    SoundKeeper64OpenOnly > same as zero

    so sofar so good it seems ive just did a quick test not like the new version that was running for days on end as default without any issue.

  25. #225
    VEG Author

    HellsAngel, so all the modes were working fine for you? Nice.

  26. #226
    HellsAngel

    Ok small update running default now i got the robotic/distorted sound happen again
    had this happen before during postal4 i blamed the game as it was very buggy but seems it may be soundkeeper or maybe nvidia noticed they released a new driver aswell.
    so im trying SoundKeeper64OpenOnly now see if it happens again.
    with postal it ook a few days now just several hours.
    will post an update if it goes wrong or you have something else you want me to try.

  27. #227
    VEG Author

    Oh, so the issue happens just from time to time? Most probably it is a driver or hardware issue then.

  28. #228
    HellsAngel

    It only happened twice that issue using default.
    now using openonly all seems fine.

  29. #229
    EMC

    Hi,
    thank you! for this really easy and useful tool!!!
    It works great to STOP the (rather good!) amplifier AIYIMA T9 annoying clicking and going in standby/asleep mode every time music stops.
    So many people looking for a solution about this little problem and really hope GG catch this thread as the solution for the "aiyima t9 clicking" problem.
    To me it worked well this latest version renaming it to "SoundKeeperSineF1A1.exe"
    Took a bit to understand how the program works but now is fine!!! :)

  30. #230
    tonycajjo

    Up until recently this has been working perfectly for me. I did get a New TV and messed with some sound settings and now it doesnt seem to work. If i use the Sine function and pick F100A1 it works as intended. (But you hear the 100Hz Sin wave) If i pick a lower frequency it does not work as intended. If i go to a low audible frequency, say F50, There's the delay before my audio kicks in and I wont hear the F50 Sin wave until there's a break in the audio (or i pause it) then i hear the F50 for a split second before it too cuts out.

    I used to use F1A1 and all was well. I Wonder if i setup my Audio or somethign to block lower frequencies and therefore it's preventing the soundbar from staying on.... any thought?

  31. #231
    tonycajjo

    so i guess its safe to say my new TV is not passing through certain sounds. I put the following and it seems to work: SoundKeeperSineF8A40 i dont hear anything and I thought I remember seeing somewhere not to go over A10, would be curious to know why, but it seems to do what I'm looking for.

  32. #232
    VEG Author

    High amplitude with too low frequency can produce unexpected side noise on some powerful speakers. It's OK to use such values if your sound bar doesn't make any noise in this case.

  33. #233
    Dave

    Hi VEG
    I have been trying to get Sound Keeper to work on my PC I start it up and it runs but nothing comes up on the sound manager and if I leave it with no sound my soundbar switches off I have tried the different names and that still nothing im on win 10 should I maybe look at something like spdif ka cause this has done nothing at all in weeks.

  34. #234
    VEG Author

    Dave,

    Did you try something like SineF1000A20? It should generate audible 1000Hz sine with 20% amplitude.
    If you can't hear this signal, please try it with the debug version and share its output here.

  35. #235
    tonycajjo

    I was playing with the Debug Version and found out that if i run SoundKeeper64dSineF35000A1 then it works and i don't hear anything. (Any of the other settings i used ended up not working.) any thought on if a high frequency like that going to damage anything? funny thing is that if i went higher, say 50000 something was audible. not 50K hz im sure but i assume the program just put a 5K or something signal output.

  36. #236
    tonycajjo

    I take that back. i was able to hear some random frequency at 35K when i listened carefully, but if i went to 22K i dont think i hear anything. i just imagine it will drive any dog crazy haha

  37. #237
    VEG Author

    tonycajjo,

    You shouldn't set frequency higher than half of sample rate that is used by your system mixer (usually 44100 or 48000 Hz), otherwise it will generate some garbage noise instead of a sine (because it's impossible to generate a signal with frequency higher than half of current sample rate). Next version of Sound Keeper will limit the frequency automatically. Just didn't think that anybody would try to set such high frequencies.

  38. #238
    Thomas

    Is it possible to make Fluctuate play continiously (or even more often) and not just once a second?

    While my soundbar stays away, it has this incredibly annoying feature where even after mere seconds of no audio activity it needs to "wake up" when another sound is played. It takes a split second but it will cut off the very beginning of e.g. a gun firing in games.

  39. #239
    VEG Author

    Thomas, all the settings are described in the readme file. You can make fluctuations more frequent (e.g. FluctuateF5 for 5 fluctuations per second) or use a low frequency sine wave (e.g. SineF10A10 for 10Hz sine with 10% volume) for keeping your audio output on.

  40. #240
    Thomas

    VEG, thanks for reply. Oddly, no matter what F-value I set with Fluctuate, it doesn't seem to make a difference in this scenario. It keeps the speakers awake, but not enough to avoid this weird 'feature'. I've been using Sine (F10A5) which does the job but it also causes weird sounds when I switch to my bluetooth headphones which are also categorized as "digital".

  41. #241
    VEG Author

    Thomas,

    Oddly, no matter what F-value I set with Fluctuate, it doesn't seem to make a difference in this scenario. It keeps the speakers awake, but not enough to avoid this weird 'feature'.

    Fluctuate uses the smallest possible amplitude (0.0000305185), it is not enough for some drivers or hardware.

    I've been using Sine (F10A5) which does the job but it also causes weird sounds when I switch to my bluetooth headphones which are also categorized as "digital".

    Maybe I'll add an option to specify exact audio device for keeping it on. It is in my list of features that I want to add. I also want to add simple GUI to configure it since there are a lot of options already, but I don't know when I'll have enough free time for implementing it.

  42. #242
    Brainy

    Not sure if anyone else with a soundbar is having issues with Atmos in Windows 11. Atmos will cut out randomly for 1 or 2 seconds. Using the LG CX with the HW-Q80R soundbar in eARC and passthrough enabled. 7.1 works fine though.

  43. #243
    Brainy

    Also, SoundKeeper loads up at startup and I see it in the process tab, but doesn't actually work. I have to disable and then turn it back on for it to actually work.

  44. #244
    VEG Author

    Brainy,

    Also, SoundKeeper loads up at startup and I see it in the process tab, but doesn't actually work. I have to disable and then turn it back on for it to actually work.

    Please try the debug version and use some audible signal like SineF1000A10 for testing the startup issue. If you are able to reproduce the issue, copy output from the debug console window and share it here in the comments. Maybe it will help to figure out what is going wrong there.

  45. #245
    sneakytiki

    everything's been working great for a while now, but recently i'm having a similar problem to Brainy. Except everything loads at startup and works fine at first, but it seems any time after the monitor goes to sleep and wakes back up soundkeeper no longer keeps the sound. Every new sound that plays has that 1-2 seconds of silence (that i believe is known as the silent stream bug and has been fixed in non-Atmos modes in the Nvidia drivers.) If i kill and restart the process, everything's back to normal and happy.

    I'm using Windows 10, but also using Dolby Atmos. Connected to a Yamaha TSR-700 and TV as a second display. I don't know if this is a recently windows update that borked something, but it's definitely a new issue.

  46. #246
    VEG Author

    sneakytiki,

    Please try the debug version and use some audible signal like SineF1000A10 for testing the startup issue. If you are able to reproduce the issue, copy output from the debug console window and share it here in the comments. Maybe it will help to figure out what is going wrong there.

  47. #247
    sneakytiki

    there's no startup issue, it starts up just fine.. and i was mistaken, it's fine after waking the monitor.. it's when waking the computer from sleep that the program is no longer active, how should i use the debug tool to help you with that? put it to sleep manually then wake it up and see what the debug console says?

  48. #248
    VEG Author

    sneakytiki,

    Yeah, that's right. Also use some audible signal like SineF1000A10 to actually hear when Sound Keeper is working.