Godot Game Causing Audio Driver to Use Excessive Power

Godot Version



Forgive me if this is an ignorant question, I am fairly new to Godot and not particularly knowledgeable about sound drivers in general.

I’m working on a gamified pomodoro tracker which displays a timer on a screen alongside idle animations of little pixel art characters running around and fighting monsters. The problem is the game heats up my Macbook and drains the battery MUCH faster than I would expect for what it is. It also prevents my computer from ever falling asleep even when I close it, even though I turned off “Keep screen on” in the project settings. I thought there might be a memory leak or something inefficient about how I’m playing my animations. However after doing some googling around I believe the problem might stem from this issue that was discussed on github several years ago. According to it, Godot is constantly using the audio driver at all times even when there’s no sound playing, basically constantly playing a level 0 “silent” sound which uses an excessive amount of power. The thread mostly talks about the editor, and not the games themselves, since I think they assume most video games will have constant background music going anyway. Mine, however, only plays a chime sound when the timer runs out.

My bluetooth headphones also lend evidence that this is what is going on. I have a pair of headphones that can pair with two devices at a time. If I’m, say, listening to music on my phone, the usual behavior is that if my macbook makes a sound it will briefly pause my phone and then resume the music on my phone when the macbook sound is finished. Most of the time this works fairly seamlessly. However, when I have my Godot game running, I cannot listen to music from my phone. It would make sense if this is because Godot is playing a constant un-pause-able silent noise that is essentially shutting out sound from the other device.

There is a suggestion in the linked thread above to switch the audio driver in the project settings to “dummy” which will disable sound entirely. I suppose this works in a pinch because as I mentioned the sound in my project is fairly limited. However the chime when the timer runs out is a fairly important feature that I feel like users will want, and I’d rather not have to scrap it if there is any other way.

Is there any way to manually force Godot to leave my poor audio driver alone when it’s not actively being used?