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 (90KB). 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).
- [2024/11/12] Added digital signature.
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 →
Steffen, unfortunately there is no such option yet. If it is a digital output, you can keep all digital outputs awake by adding "Digital" to the file name. It won't consume much resources, the code is really lightweight.
Probably, one day in the future I'll make proper settings in an ini-file or in registry, and enabling Sound Keeper for specific outputs would become possible, but can't promise it.
Got it, thanks. I'm asking because I use an interface and have SPDIF as my main, and 24 "other" audio devices of which only one needs to be kept awake (it's basically a mixer with 24 stereo channels of which each is registered as a pair of outputs and inputs).
Oh, wow, 24 outputs. Didn't expect such number =) You can test how much CPU it consumes in your case, but I think it will be less than 1% anyway.
Also it is interesting what audio device type is reported by the system for these outputs. When you enable the "all digital" mode, it tries to keep awake all audio output devices which are reported as HDMI or SPDIF by the system. So, if your audio outputs are none of these from the point of view of the OS, they should be ignored in this case. If the required output is not HDMI nor SPDIF, then "all" mode should be used, but it will enable keeping awake of all 24 audio outputs.
I love the idea of this utility, unfortunately it is not helping in my case...
I have a set of speakers, connected to the line out ports of my computer. These speakers will shut off automatically if there is silence for 20 minutes. I was hoping that this utility would work to keep the speakers active, but either the sound level is too low to be detected by the speakers, or the utility does not support the analog line outputs of my computer.
How can I know that SoundKeeper is outputting a sound through my line outputs?
Is there a way to increase the volume of the "silent sound" going to the analog line out channels?
Calab, current version of the Sound Keeper doesn't produce any sound by default, it generates just silence. It is enough for digital devices, but not enough for analog devices. There is a beta version which can generate very low frequency sine wave (which you can't hear) for analog devices. You can download it here.
You can control settings through file name. Original file name is SoundKeeperSineF1A1.exe, there are two parameters, F (frequency) and A (amplitude or volume), and it means that it should generate 1Hz sine with 1% amplitude. You can change these settings. For example, if you rename the file to SoundKeeperSineF1000A100.exe, you will hear a 1000Hz tone with 100% amplitude. Please try to find the lowest values which help you. Probably, 1Hz 1% won't be enough, try 1Hz 10% then, etc. After you find the values which help you, please write about it here in the comments, probably it will help somebody else also.
So filename is SoundKeeper64Digital.exe
Is that OK if I want to keep audio over HDMI "alive"?
By default, Sound Keeper tries to keep primary audio output on. If that HDMI is not the primary output, you should use the "Digital" suffix. But if the HDMI is the primary audio output, and Sound Keeper does what expected by default, it is better to use the default mode.
Very thankful for this tool but I would think something should have been resolved in O.S level?
Also never had the problem until I recently upgraded the motherboard only, Going from Z490 to MSI Z590, Alc4082 from realtek,
@VEG do you think I'm experiencing a defective hardware or is this the new norm....
Forgot to mention, issue that I have is Audioengine D1 that I have connected through optical would trigger relay pops, Especially during channel testing within windows sounds and almost every other time during volume adjustment chimes
Red, it is just an energy saving mode, some people consider it as a feature =) In some cases, it may be fixed by changing sound card driver (try to use standard Windows audio driver instead of the driver from Realtek, for example), or by changing some power saving related settings (probably hidden ones) of this driver. If there are no such settings, the Sound Keeper is the easiest way to fix the issue.
@VEG
thank you so much for your response. I didn't know this was caused by an energy saving feature.
Curious though... If its an energy saving feature wouldn't there be a interval before the sound driver goes into energy saving mode?
Why does the relay in my DAC produce noise from internal switch when I click audio level change within 1 second or 2 interval?
When you change volume, Windows plays a short sound, which enables audio output for a second. The DAC can't resume from sleeping that quick, so you may not hear anything. Then, the sound ends, the system turns off audio output, and the DAC goes to sleep. So, all you need is to prohibit the driver to turn off audio output when there is no sound. Sound Keeper is one of the ways. Changing driver settings or driver itself is another way.
I got to hand it to you... The Soundkeeper Sine is a nice piece of work. I'm using a setting of F10A10 to keep my Bluetooth headset from powering off!! Works like a charm!
JBGamer, is F10A10 the lowest values that help you? What exactly headset do you have? It would be useful for stats. When I collect more info about it, I'll write a short description about which settings would most probably help.
hi i have a strange problem on my system
sound keeper runs for a while and than after some time it "light crashes"
it runs but makes a ton of loud white noise
same is with spdif keepalive
after i make a sound test on the property of the sound card it goes back to normal
the noise coms from sound keeper if i mute the noise is gone
i use the realtek spdif out realtek USB onboard sound
Most probably it is a driver issue, especially if you can reproduce it with the SPDIF Keep Alive also. Probably, the driver goes crazy when a program plays silence for some time.
1. How long it works before it starts to make the noise?
2. The volume of the noise is increasing, or it is at the max level right after you start to hear it?
3. Try to use version from this message in different modes (Zero, Sine) and check if the problem occurs in these modes. Try different Sine settings, including ones which you can hear. If the problem occurs even with audible signal, it may mean that there is an issue with WASAPI in general, and it should be reproducible with other programs which use WASAPI to output audio.
1. How long it works before it starts to make the noise? ----- > random sometimes hours
2. it is at the max level right after you start to hear it? ----- > YES
3. ----- > i test it now with default no parameters just exe
yes i think this is a driver / windows / microsoft issue
thanks for the quick reply
my donation is well spend :-)
i had now after loooooong time the "alarm saw sound"
and if i click on mute in the soundmixer for soundkeeper the programm exits (crash?)
is this correct ?
SoundKeeperSineF1A1.exe -f1 -a1
i test now SoundKeeperSineF1A1.exe -f1 -a1
No, it is not a crash, it is a documented way to close the program (it is mentioned in the readme). I just didn't want to add a tray icon, so used the button in the mixer for this purpose.
You can do it this way also, but actually the program can read its default settings from the file name, so you can just change numbers after F and A in the file name to change default behavior of the program. But as far as I remember arguments are also parsed and they take precedence if specified.
so i had the full volume alarm again 3 times today
Please check the Zero mode (rename the file to SoundKeeperZero.exe and start it). Also you can check this online tone generator if you can reproduce the issue with your browser.
I wonder what could be the fix for this. Does it happen at random moments? If it were always the same amount of time before the issue occurs, probably silent restarting of streaming would help, but if the moments when it happens are random, it may happen right after restarting anyway.
with soundkeeperzero.exe i got "no digital data" on my logitech sound system
yes sadly its absolutly random
i had 2 away from keyboard
the soundkeeper.exe is not the problem
the audio driver crashes
i had now 4 times white noise without soundkeeper
If you installed specific drivers for you audio card, try to uninstall them and use standard Windows audio drivers instead.
I've tried to use this to keep my USB DAC from clicking and going offline all the time, but I'm not sure it is doing anything. I tried the beta version you mentioned to generate sine waves, but I can't get it to output anything regardless of what settings I use. Is the a log file somewhere I can look at to diagnose the issue? Thanks!
Glyph, is this USB DAC selected as the primary audio output device? If not, add "All" to the Sound Keeper file name.
If you have VS2019, you can build a debug version with debug output yourself. If not, you can use this build. It shows a console window with log messages. Please send here what it outputs. Probably, we'll figure out what's wrong.
i have a MAG-Z590-TOMAHAWK-WIFI
https://www.msi.com//Motherboard/MAG-Z590-TOMAHAWK-WIFI/Overview
and i use the driver from the website
Realtek HD Universal Driver
Version 6.3.9600.2276
the original microsoft driver crashes also ......
OK. I tried the debug version and set it up for Sine output. Sometimes it works, sometimes it doesn't. Here is the output from one run:
C:\>soundkeeper64dsinef100a10.exe
[ 4140] Windows Build Number: 7601.
[ 4140] Exe File Name: SoundKeeper64dSineF100A10.exe.
[ 4140] Device Type: Primary.
[ 4140] Stream Type: Sine (Frequency: 100.000Hz; Amplitude: 10.000%).
[ 4140] Main started.
[ 2352] Rendering thread started.
[ 2352] Render.
[ 2352] Format: PCM 24-bit integer.
[ 2352] Format: PCM 32-bit float.
[ 3280] Session is disconnected with reason 0. Restart.
[ 2352] Rendering thread finished. Return code: 1.
[ 4140] Restart.
[ 4140] ERROR: Unable to retrieve default render device: 0x80070490.
[ 4140] Restart.
[ 3488] Rendering thread started.
[ 3488] Render.
[ 3488] Format: PCM 24-bit integer.
[ 3488] Format: PCM 32-bit float.
When the session is disconnected, I unplugged the cable from the USB DAC. Then I plugged it back in (Restart). The sound comes out of the speakers (usually). I think I have a USB DAC that is failing. Unplugging it at the DAC and then replugging it is how I usually get it to start working again. I was hoping that your program would keep it from switching off (audible clicks from the speakers when this happens), but it will still do it. I've not been able to identify conditions under which it switches off -- I am still working on that. However, I do know that when the DAC is not working, it doesn't give the errors shown in the above output -- as far as the computer and your program are concerned, the DAC is functioning correctly, but no sound is coming out of the speakers.
I'd like to be able to determine if it is in fact a problem with the DAC or if it is a problem with the driver or USB on the computer. Can you think of a way I could do that? I know the audio can stop working while soundkeeper is running, and it has happened with the debug version as well, with no additional comments from the program (it apparently thinks the DAC is still functioning correctly or at least that it is still plugged in -- which it of course is). So no error flag seems to be thrown by the USB system to think the DAC has been disconnected. I don't know how these DACs work internally, but there seems to be a lot of switching going on. The DAC I have is the Dayton Audio DAC01. It used to work fine with absolutely no problems and then it started having these issues where it just doesn't pass audio, and I used to be able to solve it by killing the audiodg.exe process and restarting whatever player I was using for the audio feed, but now it requires an actual unplug of either the USB cable at the computer or at the DAC to reset it. I'm thinking I should just get a new DAC?
OK. I think I have found the issue, and it looks like it is the USB port I was using -- the port is likely having some power problems (bad cap or something). The port works fine for my mouse transceiver, but it fails intermittently with the DAC. I expect the DAC has a much higher power requirement than the mouse transceiver does, so I am guessing that is why the DAC is working fine (so far) on one of my other USB ports. It just isn't a very conveniently located port. I just wanted to let you know what I found out in case it may help someone else. Thanks!
Download isn't working. Curl just says:
This is the same link I typed so it's linking to itself.
gorgone, probably it is a hardware issue.
cgar, I just checked the link you posted and it works fine. You probably are using a link without version number, and it redirects to a file with latest version.
Hi. I want to connect things differently now. HDMI directly to TV and toslink from PC to AV receiver (another from TV to AV receiver) so I can listen to music independently of TV and also while watching it on mute. I'll set my PC to stop displaying screen after certain period of inactivity. TV should power of automatically if there's nothing to display. When the music ends AV receiver should turn off automatically too but it won't if Sound Keeper is playing silent stream. Can i set it up so it only keeps the sound while windows is displaying the screen and not when screen is off? ("turn off monitor after" option)
Bernard, there is no such a feature. I may add it in the future, but probably it won't be soon.
Currently released version prevents the computer from sleeping (as any other program which outputs audio does by default). I added a new feature into the latest beta which detects when a computer is going to sleep and disables the Sound Keeper in this case. So, you can use it to turn off your receiver when your computer is not used. It is probably even better than using "monitor is off" as a trigger. Just imagine, monitor is off after timeout, and you receive a notification with a short sound. The sound would be cut if the Sound Keeper is disabled when the monitor is off.
Just wanted to drop a note here that this for some reason didn't work for me, while SPDIF-KA 1.4 is working.
Weird, I'd prefer this option since there's no .NET, smaller footprint, and no systray icon needing to run.
I'm using an ASUS motherrboard with optical cable going to a Razer soundbar (Leviathan).
Noticed that when using SoundKeeper my notofication sounds during the day, such as Outlook, Telegram chats, etc, would be either entirely missed or only get the tail end of them, meaning the "wake-up" period was still happening.
The soundbar is set as my default audio device, so I didn't add Digital to the .exe file name.
CorneliousJD, try this version.
@VEG - Thanks! So far F1A1 is working, I'll increase amplitude as needed, but from what I can tell at this moment, it looks good w/ F1 and A1.
I'll bookmark this page and report back.
I apprecate you taking the time to reply to me, this tool is incredibly useful :)
Well, it worked great for a day and a half, but it randomly stopped working all of a sudden.
I'm going to try adjusting the F1A1 to F1A5 next and see how it goes.
I find it odd that it worked great for a period of time, then stopped?
Sorry for comment SPAM. It seems like if I don't have my soundbar (Razer Leviathan) set to 100% volume, it will go into standby still, even at F1A10
Not sure the specifics of S/PDIF and the receiver volume, but my anecdotal evendice so far suggests that if I have my receiver (soundbar) volume) set to 100% and SoundKeeperSine set to F1A1, it works ;)
Seems like the soundbar is trying to be too smart in your case. You can try higher frequency below 20Hz also, e.g. F5A1, F5A5, F10A1, F10A5... You could also try high frequencies like 22000Hz that is above what could be heard. Could you please compare results of the Sound Keeper with this online tone generator?
Thanks! Never mind. I don't even need Sound Keeper since I connected with toslink.
I just bought new computer. Motherboard Asus B560-F, Intel Core i5 11500 cpu with Intel UHD 750 Graphics, I tried the registry fix, put all zeros and nothing. 3 seconds of silence after pause videos or music. Whatsapp audios are almost impossible to hear if they are short.
My conection is direct to Sony TV via HDMI cable.
The app works... but is there another registry hack?
Thanks!
Thank you so much for this APP. Its amazing!
The enoying issue with first part of song cut off when force/clicking next song in windows is now gone! :)
(Using HDMI from my HTPC to my Surround processor.)
Does this application support "Dolby Atmos for Home Theatre" as well?
Regards,
SAK, sorry, I don't know what is the "Dolby Atmos for Home Theatre" exactly. Sounds like it shouldn't affect how audio outputs are handled by the system.
Sound Keeper can try to keep any WASAPI output device alive (when the device is in shared mode). If it is not the primary audio output device, just add "All" to the executable file name, so the Sound Keeper would know that it should try to keep all available audio output devices alive, not just the primary device. The easiest way to check if it works for you is to test it on your setup.
If "Dolby Atmos for Home Theatre" implies WASAPI exclusive mode, the Sound Keeper should pause itself for the time while the device is in the exclusive mode. When the audio output device is switching from the shared to the exclusive mode, you may hear it. Exclusive mode implies that only one program can work with the audio output, so Sound Keeper can't do anything with it.
Ah ok.
I just noticed one thing last night. So it works perfectly with music, I can play TIDAL or FLAC files with VLS.. and it is all smooth, not PCM stream reset detected by my receiver. I get all start of song etc. (also I can jump to the middle of a song without this issue, just we should be able to do normally)
But what I noticed is that it is still the same issue with for expample netflix or videos.
Its like your application gets "put to the side, and paused" or whatever to call it when I open Netflix for example.
It is not a big issue, but that first "netflix logo pop-up sound" is silent each time a new episode or whatever starts because it resets PCM stream just like it did when playing music without your program.
This is tough not as enoying as when playing music. :)
Forgot to mention I only use HDMI out for audio and video. All other outputs in windows is "disabled" :)
SAK,
Check settings of the application. Probably, it just uses exclusive mode. In this case, it is expected that the Sound Keeper is automatically paused. Change settings of the app to use shared mode. You can also prohibit exclusive mode in the settings of the audio output device.
I'd like to report that F10A1 in the beta sine version works for my Creative GigaWorks T40 Series II
The frequency is inaudible to me but is enough to keep the speakers on
Thanks for making this tool
I have a FIIO e10k (what a piece of junk this is btw, so many problems - it really is a shiit company), and soundkeeper fixed the popping noises at start/end of audio playback (imagine discord, somebody makes a slight sound - this activates the dac and "POP" "POP" - really fucking annoying). HOWEVER, I now have a high pitched hum when I turn up the volume (anything above 50% is audible and annoying), which is caused by soundkeeper.exe. Any ideas?
Cheers.
What mode do you use? Try different modes. You can change it by renaming the Sound Keeper executable file. It is described in the readme file.