microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
110.87k stars 6.53k forks source link

Play inaudible sound every few seconds to keep speakers awake #16059

Closed Chris-Greaves closed 2 years ago

Chris-Greaves commented 2 years ago

Description of the new feature / enhancement

A sound file containing some inaudible sound will be played every so many seconds (default to 5 maybe?) so that the connected speakers don't fall asleep. Off by default, could probably be combined with the existing Awake module as a new option. Although, I personally would want the audio awake feature without the screen awake feature being on.

Scenario when this would be used?

Some speakers or drivers have a feature where they will go asleep if no audio is played for a set amount of time. When a sound is then played the speakers or driver takes a few seconds to wake up, and short sounds like notification bells are lost. I'm guessing this exists as an energy saving feature, and on some devices cannot be turned off. When working from home, it can be important to listen out for notification sounds to know when someone is messaging you. I've definitely ghosted a few fellow devs because I didn't hear the notification from teams.

Supporting information

There are definitely scripts or tools that exist that do this, however their trustworthiness is often in question or people lack the motivation to create the scripts themselves. Examples of people looking for solutions:

I am willing to look at implementing this myself and submit a pull request, but as your guidelines state it's best to create an issue first the get the discussion started.

crutkas commented 2 years ago

Didn't know this was a problem. can you give a brand / model number for one that this occurs? /needinfo

Chris-Greaves commented 2 years ago

Hey, so possibly a European only issue? My work laptop uses Bang and Olufsen audio drivers which cause the issue, and I know certain speakers have this built into them. (see https://youtu.be/wRXUXmExHuY).

That video mentions some European environmental laws forcing electronic appliances to have an auto sleep function. I could try and track down this legislation if you really need it... I've already begun creating a PoC to see how I could implement this.

Chris-Greaves commented 2 years ago

Can I get this issue marked as In Progress please?

crutkas commented 2 years ago

@Chris-Greaves I don't know if we all agreed to doing this. I strongly believe in the idea of giving users power over their computers and devices. I get the pain but not sure i agree with possible solution nor if it belongs in PowerToys since this isn't about doing work and circumventing an environment regulation.

I'm inclined to say having this in your personal repro would be the best spot for a solution. If you want to use Awake as a base, we're MIT licensed so you are more than welcome to.

crutkas commented 2 years ago

I don’t think this is something we will incorporate

drittich commented 2 years ago

IMO this would be a nice addition. Many people using Rokit powered studio monitors suffer from this as well, as they go to sleep after 30 minutes. See https://www.google.com/search?q=krk+rokit+sleep+mode

(I wrote my own utility to resolve this issue, https://github.com/drittich/RokitIgniter/releases)

Chris-Greaves commented 2 years ago

I'm in the process of writing my own "Awake" app as well, that will allow you to set multiple devices to keep awake as well as keep the screen awake. I will post it here once done in case anyone finds this again in the future. 😄

MardariG commented 3 months ago

Another problem that this feature may fix for me: I connected recently a subwoofer to my external speakers, and now, when you pause or start to play something, there is a loud short noise from the subwoofer triggered by sound card idle/awake status. I agree this may be a speaker issue, but still this feature kind of will help me with the problem.