Prevents SPDIF/HDMI/Bluetooth digital audio playback devices from sleeping. Uses WASAPI, requires Windows 7+. It doesn't have GUI and starts to do its job right after the program is started. To make it autorun, copy the soundkeeper.exe into the startup directory that you can access by pressing Win+R and entering shell:startup. To close the program, run the soundkeeper.exe kill command or just kill its process.
Download: soundkeeper.7z (76KB). Source code →
The archive contains a few builds (you can remove unused ones):
- SoundKeeper64.exe is for x86-64 versions of Windows, most people need this version.
- SoundKeeper32.exe is for x86-32 versions of Windows, if you have a very old PC with 32-bit Windows.
- SoundKeeperARM64.exe is a native ARM64 build, if you have a new ARM based PC.
There is also a debug version that outputs all debug logs into a console window. Please provide the logs when you report issues.
Features
- Sound Keeper is fully automatic and doesn't require any user interaction.
- Supports keeping on multiple sound outputs (e.g. an SPDIF and an HDMI).
- Detects new sound outputs on the fly (e.g. when you connected a TV via HDMI).
- Supports various stream types that should help in all possible cases.
Settings
Default behavior can be changed by changing file name of the Sound Keeper executable (just add desired settings to the Sound Keeper file name) or by passing them as command line arguments. All settings are case insensitive.
Primary audio output is used by default. If current primary audio output has changed, the Sound Keeper detects this and switches to the new output automatically. If you want to run Sound Keeper on all enabled audio outputs, just add All to executable file name to enable Sound Keeper on all outputs.
All supported audio output type modes:
- Primary keeps on primary audio output only. It is used by default.
- All keeps on all enabled audio outputs.
- Digital keeps on all enabled SPDIF and HDMI audio outputs (like it was in Sound Keeper v1.0).
- Analog keeps on all enabled audio outputs except SPDIF and HDMI.
Inaudible stream of zeroes with infrequent smallest possible non-zero samples (fluctuations) is used by default. Add Zero to executable file name to use stream of zeroes only.
All supported stream types:
- OpenOnly opens audio output, but doesn't stream anything. Sometimes it helps if it's a driver only issue.
- Zero plays stream of zeroes. It may be not enough for some hardware.
- Fluctuate plays stream of zeroes with the smallest non-zero samples once in a second. Used by default.
- Sine plays 1Hz sine wave at 1% volume. The frequency and amplitude can be changed. Useful for analog outputs.
- White, Brown, or Pink play named noise, with the same parameters as the sine (except frequency).
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.
Stream parameters:
- F is frequency. Default: 1Hz for Sine and 50Hz for Fluctuate. Applicable for: Fluctuate, Sine.
- A is amplitude (i.e. volume). Default: 1%. If you want to use inaudible noise, set it to 0.1%. Applicable for: Sine, Noise.
- L is length of sound (in seconds). Default: infinite.
- W is waiting time between sounds if L is set. Use to enable periodic sound.
- T is transition or fading time. Default: 0.1 second. Applicable for: Sine, Noise.
Examples:
- SoundKeeperAll.exe generates default inaudible stream on all enabled audio outputs.
- SoundKeeperZero.exe generates zero stream on primary audio output.
- SoundKeeperAllZero.exe generates zero amplitude stream on all enabled audio outputs.
- SoundKeeperSineF10A5.exe generates 10Hz sine wave with 5% amplitude on primary audio output. It is inaudible.
- SoundKeeperSineF1000A100.exe generates 1000Hz sine wave with 100% amplitude. It is audible! Use it for testing.
- SoundKeeper.exe sine -f 1000 -a 100 is command line version of the previous example.
- SoundKeeper.exe brown -a 0.1 generates brown noise with 0.1% amplitude.
What's new in v1.3.4
- Tune the Windows 8-10 WASAPI memory leak workaround to make it working for longer time.
- Native ARM64 build (with statically linked runtime hence the bigger binary).
What's new in v1.3.3
- Fixed arguments parsing bug: All or Analog after specifying stream type led to amplitude set to 0.
What's new in v1.3.2
- Fluctuate treats 32-bit PCM output format as 24-bit since WASAPI reports 24-bit as 32-bit for some reason.
- Fluctuate generates 50 fluctuations per second by default. It helps in many more cases.
- Sound Keeper doesn't exit when it is muted.
What's new in v1.3.1
- A potential deadlock when audio devices are being added or removed has been fixed.
- Fluctuate treats non-PCM output formats (like Dolby Atmos) as 24-bit instead of 16-bit.
- Frequency parameter F is limited by half of current sample rate to avoid generation of unexpected noise.
- More detailed logs in debug build. Debug output is flushed immediately, so it can be redirected to a file.
What's new in 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.
Sound Keeper vs. SPDIF Keep Alive vs. SPDIF-KA
Sound Keeper v1.3 | SPDIF Keep Alive v1.2 | SPDIF-KA v1.4 | |
Fully automatic: | Yes | No | No |
Multiple outputs: | Yes | No | No |
Stream types: | 7 | 2 | 2 |
Periodicity: | Yes | No | No |
GUI: | No | Yes | Yes |
Requires .NET: | No | Yes | Yes |
Executable size: | 20KB | 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 doesn't go into sleep mode automatically after specified time of inactivity. 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 →
Jonathan,
I think you could try to use the standard Windows Task Scheduler for this.
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?
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.
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.
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.
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.)
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!
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.
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:
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.
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
- I've noticed that although SoundKeeper64.exe doesn't show up here, when I play audio in Chrome, it definitely does:
What could be preventing SoundKeeper64.exe from showing up here?
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?
Tried that and confirmed it didn't make a difference as to what shows up in
. 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.
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.
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)
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.
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.
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).
Thanks will try it right away, that periodicity thats a nice feature to have aswell.
Sound Keeper v1.3.0
Thanks to AnaLogiC76 for the ideas and code of OpenOnly and NoSleep.
HellsAngel, so, does the new version of the Fluctuate stream work for you? Is it better than Zero?
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.
HellsAngel,
The FluctuateF1 is the default mode now. Did you check if Zero or OpenOnly helps?
No i havent checked those just ran default its been running several days now sofar so good.
HellsAngel, it would be nice if you check Zero and OpenOnly modes also, just out of curiosity.
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.
HellsAngel, so all the modes were working fine for you? Nice.
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.
Oh, so the issue happens just from time to time? Most probably it is a driver or hardware issue then.
It only happened twice that issue using default.
now using openonly all seems fine.
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!!! :)
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?
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.
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.
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.
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.
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.
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
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.
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.
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.
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".
Thomas,
Fluctuate uses the smallest possible amplitude (0.0000305185), it is not enough for some drivers or hardware.
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.
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.
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.
Brainy,
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.
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.
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.
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?
sneakytiki,
Yeah, that's right. Also use some audible signal like SineF1000A10 to actually hear when Sound Keeper is working.
i got this error msg after some time of playing
DMT - Unhandled Non-UI Thread Exception
Object reference not set to an instance if an object
https://i.imgur.com/qspRZns.png
Windows 11
Samsuns Q700a bar
graphic card 3080