Sound Keeper v1.3.4 [2024/09/15]

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 →

  1. #51
    lightstorm22

    Thank you so much @DornoDiosMio for the registry tweaks and @VEG for the software. I have a Denon AVR-891 and AMD 5350 HTPC and this has been driving me insane for months. One of the hardest things was finding the right thing to Google search and come across this. For me it was not just losing the first couple seconds of sound. Kodi would do that then be ok, but in things like YouTube (in Chrome) or VLC (via Remote Desktop) I would hear the first second or two, then lose audio completely until I refresh the page or restart my Remote Desktop session. You could see the receiver detect and lose the stream, I just didn't know that is because of a keep alive. It was infuriating, but I think one of these two solutions is going to work for me.

  2. #52
    Gaurav

    Hi. I need a version of SoundKeeper for Windows 95/98 for a similar problem in a VirtualBox VM on Windows 10 64-bit. Can you please compile it for these older OSes. Some older programs in a VM are a lot of fun with sound properly working.

  3. #53
    VEG Author

    Gaurav, it is not possible to build it for Windows 98. It uses WASAPI which appeared in Windows Vista.

  4. #54
    Taryngar

    I'm so grateful software like this exists to get around the issue of trying to use high-definition digital outputs instead of dealing with clunky analog cables to receivers. So thank you!

    Lately, I've been noticing that sometimes, either right when my computer starts, or when I bring it out of screen blank (not standby, since my computer never does that), my sound is gone. Stopping the soundkeeper process immediately restores the sound (but with the same wakeup delay that this program is designed to fix). If I restart the process, it works fine again. I am using optical S/PDIF from my motherboard, which is registering itself as a Realtek USB Audio device (kinda sad that an $800+ TRX40 motherboard would have use a simple USB audio bridge for this, but whatever, digital is digital).

    I see that there's some code that's newer than the 1.0.3 release to address background recovery of the soundkeeper process. Do you think any of this new code might be the solution to this problem? If not, I'd be happy to run some debugging to see what's actually causing it to lock up my sound device.

  5. #55
    joshuacant

    I can confirm what Taryngar is saying. Killing soundkeeper or disabling and re-enabling the audio device in the Sound control panel fixes the issue. My setup is HDMI to a Sony receiver.

  6. #56
    VEG Author

    Taryngar, joshuacant, please try debug version. It will display a console window with debug output. Reproduce the issue and tell what Sound Keeper outputs in the console window.

  7. #57
    Alex

    Hi,

    Chrome is flagging the zip file as potential malware and won't allow download. You should have a talk with them to avoid damage to your reputation :).

    Edge works fine.

  8. #58
    VEG Author

    Google doesn't accept complaints from small developers like me. Usually it takes some time for them to figure out that some new program is safe. Hope, it will be soon =)

  9. #59
    Taryngar

    Chrome's Safe Browsing system got a release that completely broke a lot of downloads for several hours on July 17th. It should have been fixed by the 20th, but I guess some computers might not update the Safe Browsing subsystem as quickly as others. I will note that I've downloaded the file in Chrome without issue before and after the recent bug. I just haven't been able to reproduce the issue (which means it may have been fixed by it restarting itself frequently).

    Here's the master Chromium bug for that issue, which has several other bugs merged into it due to how many people reported the impact: https://bugs.chromium.org/p/chromium/issues/detail?id=1106858#c1

    It was almost as bad as the Cloudflare failure that also happened on Friday and took out half the Internet for a couple of hours.

  10. #60
    Alex

    Still broken for me, can you update Safe Browsing system manually?

  11. #61
    VEG Author

    Google really considers it harmful and doesn't let you download the file normally. Firefox uses the same Google's Safe Browsing to detect suspicious downloads, so it doesn't let you download the file also. Sent them a request to review the file.

    It is hilarious that every tiny program is often considered as some suspicious software. I like to make tiny programs, and I encounter this prejudice quite often. If you make a 100MB monster, nobody will complain. But when your program is just 14KB, stupid AV software starts to claim that it is definitely a virus. But why? It is not that hard to make a 100MB virus.

  12. #62
    VEG Author

    They already rejected my request a few hours ago. I'm quite sure that the decision is done by a stupid bot and nobody actually read my request. It is not the first time I have to deal with Google. Recently, Google also removed Chrome version of my Pure URL extension because "the description is inaccurate", and they didn't care about my explanations that it is a mistake from their side.

    Google harms all small independent developers. When you see that somebody sets a password to an archive with their program, it is because of the Google. But I don't want to set passwords to archives with my software, it is just stupid. Will try to use 7z instead of zip.

  13. #63
    Pat

    Hi Veg, thank you for making such a useful and efficient program!
    Could you please update the source code with the code for the 1.1.0 version? I'd like to build it for myself.

    Thanks!

  14. #64
    VEG Author

    Pat, BitBucket sunsets support of Mercurial repositories. They already switched all my repos to read only mode, so I can't update it right now. The only unpublished part is parsing settings from executable file name. I plan to convert my repos to Git and to move them to GitHub later, so it will be published then.

  15. #65
    Dude Guyman

    "Default behavior can be changed by adding options to the Sound Keeper executable file name."
    Does this mean adding them to the shortcut target? If so what syntax? SoundKeeper64.exe -Digital? SoundKeeper64.exe /Digital?
    What about if I start soundkeeper via registry?

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
    "SoundKeeper64"="C:\\Program Files\\apps\\SoundKeeper\\SoundKeeper64.exe -Digital"?

    Thanks.

  16. #66
    VEG Author

    Dude Guyman, just add it to the executable file name itself. For example: DigitalSoundKeeper64.exe. I know that it is a bit unusual, but it was the simplest thing I could do. Probably, in newer versions I'll make it reading settings from registry.

    But, you probably don't need to change the new default mode. By default, Sound Keeper works on current primary sound output. When you enable "Digital", it starts to work on all digital outputs (SPDIF/HDMI), as it was in the v1.0. When you enable "All", it starts to work on all outputs (even if they are detected as not digital). Usually, users need to keep current primary output only.

  17. #67
    VEG Author

    AV software were complaining a lot about 32-bit version of the program for some reason. Added standard runtime library to make executables a bit bigger. According to VirusTotal, it is much better now. I hope that it will help. Waiting when Google rescans the file.

  18. #68
    Taryngar

    It appears that my problems have been fixed by not using the terrible Realtek onboard audio device that comes on my ridiculously expensive TRX40 motherboard. Kinda sad that a literal top-of-the-line board has the digital audio dangling off the internal USB bus, but there you have it.

    Now I'm using an EVGA Nu Audio Pro board, and thus far I've had zero instances of the sound randomly deciding to go on vacation. I'll give it a bit more time to screw up before forgetting about SoundKeeper just running in the background doing its job.

    Thanks again for this program. It's going to continue being very helpful until I end up buying a $1500 receiver to handle 7.1 channels through analog.

  19. #69
    Halex

    I have a Marantz HD-DAC1 headphone amp and there's a relay that disables the output when no sound is playing. Not only is it annoying to hear but I fear that the relay will reach its end of life in no time. Your program works perfectly, thank you!

  20. #70
    fatguy666

    VEG, thank you very much for this. Not sure how I never seen it before as I'd seen posts from DornoDiosMio about the reg fix.

    Unfortunately, the reg fix wasn't doing anything for me. What I had been doing was setting one of the "recording" devices to "listen to this device" and having it output "silence" to my soundbar. Even then, sometimes the "playback through this device" would switch to "default playback device" and even though I only had one enabled playback device it just stopped the process.

    I can tell that this is working as the Dolby Home Theatre app is showing a flatline https://i.imgur.com/oCLLIZU.jpg

    Thanks again!

  21. #72
    HyuckJoon

    Thank you very much! Solved the annoying problem at once!

    My system is a Logitech Z-5500 and the sound card is Sound Blaster 5.1 V3!

  22. #73
    Link

    I'm not sure if you're able to help me on this one, it's quite specific:

    My setup consists of HDMI from the computer to a 4x2 HDMI Matrix - this Matrix has three outputs though, two of them output to monitors like a normal matrix with the third outputting a passthrough audio signal to AV receivers for sound only. This allows me to switch to audio sources of any of the inputs and display any combination to either screen.

    When running SoundKeeper, everything works perfectly as intended, but, as soon as I turn off the AV receiver, my virtual memory usage will go up by ~10MB per second. That might not seem like much when I have 16GB of RAM with a 24GB pagefile, but over the course of about 15-30 minutes, I'll be out of virtual memory with applications crashing and Windows grinding to a dead halt until I restart.

    If the AV receiver is either on or off, Windows will still see the monitor that it's connected to, it just doesn't know that it can no longer output sound to it when the AV receiver is off. To make matters worse, even after turning my AV receiver back on, it won't release that used up memory until I restart Windows - at least it'll stop using up the virtual memory from that point onwards.

    It took a while to narrow down that the issue is actually SoundKeeper. I initially came across this problem because I wanted to save a bit of power when the AV receiver isn't in use at all, but I was still using the computer itself. 50+ watts of idle power across a whole day starts to add up. So far, the workaround has been to either leave the AV receiver on or kill the SoundKeeper process.

    Do you have any suggestions or ideas on how to workaround this issue? or will I have to keep on killing the process?

    Thanks

  23. #74
    VEG Author

    Link, what version of the Sound Keeper do you use? What version of Windows do you have?

  24. #75
    Link

    @VEG, my apologies, I had an older version (1.0.4) - using 1.1.0 appears to fix the issue. It looks like I downloaded 1.0.4 back in late June when I needed to keep my audio device to stay awake and didn't update since then.

    For reference, I'm using Windows 10 Pro 1909.
    Sorry, that should have been the first thing to check. Thanks for the reply.

  25. #76
    VEG Author

    Link, actually, it is caused by a bug in Windows 10 (Windows 7 is not affected). I made an ugly workaround in the v1.1.0 to fix it.

    Waiting when Microsoft fixes the memory leak. I already reported it to the Windows developers, and hope that it will be fixed in the version 20H2. I'll remove the workaround after that moment.

  26. #77
    Jon Heal

    Microsoft Defender on Windows 10 2004 is saying the app contains this:

    Trojan:Win32/Spursint.F!cl

  27. #78
    VEG Author

    Apparently, it is a false-positive. AV software often considers small programs as suspicious.

  28. #79
    Martin_HM

    My findings with Foobar2000. Veg, if I'm wrong, please comment.
    Initialy, I couldn't get Soundkeeper to work in combination with Foobar and its original WASAPI component. This component requires Exclusive Control of the audio output. In result, I could see the Soundkeeper task running and I could also see it in the Mixer, but at every gap between two songs, SPDIF would switch off.
    I did get it working with the new SHARED WASAPI component, which Foobar offers since last year. Selecting WASAPI (shared) SPDIF as output device allows Soundkeeper to work perfectly.
    Thank you very much, Veg!

  29. #80
    Chris

    Hi Evgeny,

    Can you please shine some light on when you plan to move this to GitHub?
    For security reasons, I don't run exe's from the internet and would like to build it from source.

    Thanks in advance,
    Chris

  30. #81
    VEG Author

    At this moment, I plan to use hg-git to push my changes to GitHub from my local Mercurial repo. I wait when the hg-git developers add support of exporting Mercurial branches to Git branches without adding unnecessary Mercurial bookmarks to my local repo. AFAIK, this feature is in development, but don't know when it will be released.

  31. #82
    Chris

    I went from VSS (Visual Source Safe) to TFS to git, so I completely understand some of the issues that come along with a migration like that :)
    Good luck & I look forward to your successful migration!

  32. #83
    NexusP

    Thanks for this. I was using the registry hack up until a previous windows update through it out of wack. The sound was cutting out intermittently. This program works for my needs without the delay that was caused by the registry hack. Can't believe i just found it after yet again searching out an alternative solution.

  33. #84
    VEG Author

    Chris, I uploaded the source code to GitHub.

  34. #85
    Anton

    Thank you! :)

  35. #86
    Walt

    192.168.122.104 0/ 83
    20.189.118.208 0/84 8075 HK
    8.252.217.254 0/87 3356 US

    When I run the 64 bit Soundkeeper through Virustotal, it report that it contact these 3 Ip's.

    It only happens in the 64 bit but not in the 32 bit.

  36. #87
    VEG Author

    Walt, Sound Keeper doesn't try to contact anything on the web. It doesn't use network libraries at all.

    Seems like VirusTotal makes a snapshot of some VM, then runs the program there, and then makes another snapshot of the VM, and compares it to the previous one (collecting all the network activities made from this VM in-between). If you look through all the data, you will see, that apparently at that moment some other program started to do something. For example, look at the list of mutexes. Only DigitalSoundKeeper is created by the Sound Keeper. There is Global\DSM_SoftwareInstall_Mutex, which looks like installation of something was occurring. And if you consider that something was written to C:\ProgramData\USOPrivate\UpdateStore\, you can be quite confident, that some program started to install its updates.

  37. #88
    Walt

    Thanks for the reply, im just being cautious with any .exe I run on my computer. I looked through the code, and compiled it myself. Can't say im an expert in reading code, but everything looks good.

  38. #89
    Jankus Barna

    Hi, I cannot download the soundkeeper.7z file. I click on it, and nothing happens

  39. #90
    VEG Author

    Jankus Barna, just checked it, it was downloaded fine. Please try again =)

  40. #91
    T.K.

    Thanks VEG for this! First entry into using AVR, 2 hours of frustration and this ends my search for the cure.

    FYI for those who are not IT savvy enough to compile the exe yourself by using the source code. If you are using chrome to try download, just clicking the download link will not initiate a download as chrome flags it as dangerous. Right click the link, select save as then select keep when chrome prompts at the bottom download bar.

  41. #92
    Mobius1

    Works perfectly, however sound is gone when I power up my AVR the next day until PC then AVR are rebooted. PC remains on 24/7.

    RTX2070>Onkyo TX-NR616 via HDMI

  42. #93
    Anton

    Mobius1, I use Onkyo too.. they are known for having issues with HDMI switching.. might be cause of that.
    Just guessing.
    Mine have simliar behaviour as you describe.

  43. #94
    RealName

    Hi, the download is showing as unavailable for me, does anyone have a mirror link please?

  44. #95
    RealName

    EDIT: I was able to get this to download by my NAS, but my PC refuses. Using Chrome on Windows 10 x64

    Chrome is Version 87.0.4280.141 (Official Build) (64-bit)

  45. #96
    absolution

    Hi VEG!
    Really great software. It does exactly what I need.

    I'm running this on Windows 10 and one thing I've noticed is that a process called "Windows Audio Device Graph Isolation" (WADGI) also runs when I run SoundKeeper. WAGDI takes up between 2% and 3% of my CPU. My PC runs 24/7 so I like to keep the CPU usage as low as possible.
    Should I expect WAGDI to also be running?

    Thanks for your help and amazing app!

  46. #97
    VEG Author

    absolution, as far as I understand, you are talking about the audiodg.exe process. Yes, this system process is running always when you play any sounds, even when it is just silence. It is weird that it takes 2%-3% of CPU. On my quite old machine (from 2014) it is usually 0.1% or so. Probably, you enabled some DSP processing for all sounds on your system? Or it's a Windows 10 issue, I don't know. I still use Windows 7 on my home PC.

  47. #98
    absolution

    ah thanks for this!
    Yeah, that's right, the exe name is audiodg.exe. My PC is from 2012 (running an OC'd 2500k).

    >Probably, you enabled some DSP processing for all sounds on your system?
    It's entirely possible that I've enabled something I should have. Do you know where I could look to check this?

    Ah another W7 fan. I've very only recently swapped to W10.

  48. #99
    VEG Author

    It must be somewhere in the settings related to audio outputs. But probably it is normal for Windows 10, I don't know. Many things are less optimized in Windows 10. Even the new calculator loads for ages in comparison to how quick was the old calculator.

  49. #100
    Steffen

    Is it possible to specifically target a sound device to "keep awake"? The one I'm looking at is not the default audio device and I don't wan't to keep all of them awake, since there are quite a few and I don't know how the tool scales.

Comments are temporarily closed.