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 (23KB). Source code →
The archive contains two versions:
- SoundKeeper32.exe is for x86-32 versions of Windows.
- SoundKeeper64.exe is for x86-64 versions of Windows. The most popular variant.
- I could make a native ARM64 version, but I need somebody with such machine for testing it before releasing.
There is also a debug version that outputs all debug logs into a console window. Please show 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.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 →
SoundKeeperSineF1000A0.1L1W10
SoundKeeperbrownA0.1L1W10
Strangely, two command line above in the filename didn't prevent it to go to sleep/off.
😅
But does any loud noise like SineF1000A10 prevent it from sleeping? Maybe it ignores any sounds and just sleeps based on a timer?
I now tries higher Sine Wave, starting from 24000
SoundKeeperSineF24000A0.1LW10
Will update here on what i found works.
it's been more than 20 minutes, and i can see that it still have the white dot on the display , meaning it's staying alive/on.
I guess it works?
I want to ask that if SoundKeeperSineF24000A0.1LW10 , correct? especially the last part of W
LW10 part makes no sense because L does not have a value here. You should either specify both L and W, or remove both of them. L is length of a sound, and W is wait time between sounds (both in seconds). I would recommend to use something like L1W300 that will make a 1-second sound every 5 minutes (300 seconds).
I definitely need to finish GUI part of this app to reduce amount of questions how to configure it =)
L 's default is infinite, does that mean I don't need to put L in the file name for it to go Infinite?
Yeah, it's the default.
Now i found one settings that finally worked, does the Soundbar volume level effect the program?
Stuart Lee,
It would be nice if you share name of your soundbar and settings that work for you.
It depends on how your soundbar works. If changing soundbar volume on the soundbar is not reflected in Windows anyhow, it can't affect Sound Keeper in any way. But the soundbar itself can take current volume into account when it tries to detect silence.
it worked yesterday, now it doesn't. Not sure what went wrong, haha... had to look into it..
My soundbar was ' EDIFIER B700 Dolby Atmost Soundbar '
By now it doesn't work , is when i first switch on the pc. I put the program in Startup folder though.
Still monitoring the soundbar. I switched off the pc, turn off the wall socket switch, wait for 15 seconds and turn back on the pc. The program was running in Task Manager ( startup programs ).
Will report here if the soundbar stays on or off.
I found the issue, it was i checked the option of the program's properties to ' run as administrator ' and that prevented it from running on start up properly.
Now i am trying to put my pc to sleep and let the soundbar goes to standby/off and wake my pc again to see the program works after pc wakes up.
I've tested for over 10 days since last post at 15 March. My soundbar now stays awake as long as my pc stays awake ( had to sacrifice sleep for pc ) .
Thanks , author.
Soundbar is Edifier B700 5.1.2 Dolby Atmos Soundbar.
So after testing on my Surface Laptop Studio 2 for quite a while, persistent audio doesn't prevent a machine from entering Modern Standby like it does with S3 sleep. I've also confirmed this by exiting SoundKeeper and simply playing music, my machine will enter Modern Standby after a while with music playing and this can be confirmed with Event Viewer as it can when just using SoundKeeper with default settings. This is great for users with newer hardware that supports Modern Standby as there is essentially no compromises when using SoundKeeper on these devices.