mute the game while alt-tabbed

Ideas, that are too old (too much things changed) or won't be implemented cause of some reasons or if there are obvious better suggestions.

Moderator: ickputzdirwech

pmnox
Inserter
Inserter
Posts: 25
Joined: Mon Jun 03, 2013 6:17 am
Contact:

mute the game while alt-tabbed

Post by pmnox »

Is there any way to mute the game while I alt-tab the game ?
Or maybe even pause the game as well at the same time?

Every time when I want to do some other stuff I have to close the game, because the music keeps playing even though the game runs in the background. It is so annoying :/
I think that I will have to turn off the music completely.

Another solution would be to stop the music while in the menu after pressing the escape button.

MF-
Smart Inserter
Smart Inserter
Posts: 1235
Joined: Sun Feb 24, 2013 12:07 am
Contact:

Re: mute the game while alt-tabbed

Post by MF- »

since you didn't ask for an automatic one: You should be able to mute an application in the system sound mixer
.. so that's why some closed-source games sometimes cut-off their music when I focus another window ..

What about "when the game is paused, the music runs for, say, a minute since the last user activity (mouse motion and window focus) and then nicely fade-out?"

Hi-Torque
Inserter
Inserter
Posts: 22
Joined: Mon May 27, 2013 6:47 pm
Contact:

Re: mute the game while alt-tabbed

Post by Hi-Torque »

That's odd, for me when I press ESC and alt tab out and in the music does stop. I am quite impressed, the last build ran for almost two weeks straight. The new build has been running since last night, alt-tabbing away...in fact I can play another alpha Kerbal Space Program, and Factorio at the same time and the music plays as appropriate.

MF-
Smart Inserter
Smart Inserter
Posts: 1235
Joined: Sun Feb 24, 2013 12:07 am
Contact:

Re: mute the game while alt-tabbed

Post by MF- »

I am not sure whether it plays when I minimize factorio, because I don't do that.

pmnox
Inserter
Inserter
Posts: 25
Joined: Mon Jun 03, 2013 6:17 am
Contact:

Re: mute the game while alt-tabbed

Post by pmnox »

I know that I can use mixer every time I alt-tab the game, but it is really annoying to do. I think that I'll just turn off the music alone from the game menu and just leave the sfx on.

Besides, is there any reason to listen to the game music while I'm not playing it? It is really annoying for me to listen to listen to the game music when I'm trying to play a movie or start another game while Factorio is on.

MF-
Smart Inserter
Smart Inserter
Posts: 1235
Joined: Sun Feb 24, 2013 12:07 am
Contact:

Re: mute the game while alt-tabbed

Post by MF- »

BTW: (nothing immediately useful, true BTW)
This sounds like something that should be implemented in the sound service/API, instead of each individual program.
That way the users would be able to configure it there for all programs at once.
I think it should be possible to write a PulseAudio module that would do exactly that. I tried to search for it, but I guess noone tried yet. (And people with the skills likely don't care. Or just have PA mute the "game" audio streams when a stream with a role "video" or "phone" appears)

SilverWarior
Filter Inserter
Filter Inserter
Posts: 559
Joined: Mon Mar 04, 2013 9:23 am
Contact:

Re: mute the game while alt-tabbed

Post by SilverWarior »

MF- wrote:This sounds like something that should be implemented in the sound service/API, instead of each individual program.
Could be doable with sound service API but it is not practical. Why? Take next example:
You are chating with a friend of yours via Skype and then you switch to another program which is also capable of producing sounds. You would still like to hear your frinds chat from Skype right? For this to be able you would need to tell your sound service API I still wan't to hear my friend in Sykpe but I would also like to hear sound from this program, but not sounds from other programs.
Where is inpractical thing? Each program would have to notify sound service whter its sounds should be always played or only optional. You can do this simply by alowing or disalowing each program to generate its sounds when inactive or not. You don't need to involve sound service API into this.

Now I understand that sometimes you go and quickly ALT+TAB to som other aplication and you don't like hearing Factorios music in the background all the time.
But what I don't understand is why you don't close the Factorio if you gonna be playing Kerbal Space Program for instance. I mean having both games open and one of them is pused that is just plain stupid. Why? Even when you pause the Factorio or any other game the game still has to rencder its screen (game in the bacground, main menu, etc.). And this is still consuming some of your processing power. More processing power means more energy required. More energy spent means higher electrical bil. But offcourse many our younger players don't care about that much since they are not the ones paying electrical bils.

MF-
Smart Inserter
Smart Inserter
Posts: 1235
Joined: Sun Feb 24, 2013 12:07 am
Contact:

Re: mute the game while alt-tabbed

Post by MF- »

Telephony applications can be easily recognized, that is actually implemented in the current pulseaudio version.
If the user chooses so, music players are automatically "corked" during phone calls. Next release even allows lowering their volume instead of complete mute.

Hi-Torque
Inserter
Inserter
Posts: 22
Joined: Mon May 27, 2013 6:47 pm
Contact:

Re: mute the game while alt-tabbed

Post by Hi-Torque »

Silver Warior said:
More processing power means more energy required. More energy spent means higher electrical bil. But offcourse many our younger players don't care about that much since they are not the ones paying electrical bils.
Well you certainly have a point there in regards to power consumption. In any case I certainly understand what your saying as I frequently have a similar discussion with my son who is currently in college.

I was trying to understand the issue and testing...I do not normally play two games at once. I still do not understand why Esc/alt tab will mute the music for me but not pmnox?

pmnox
Inserter
Inserter
Posts: 25
Joined: Mon Jun 03, 2013 6:17 am
Contact:

Re: mute the game while alt-tabbed

Post by pmnox »

Hi-Torque wrote:Silver Warior said:
More processing power means more energy required. More energy spent means higher electrical bil. But offcourse many our younger players don't care about that much since they are not the ones paying electrical bils.
Well you certainly have a point there in regards to power consumption. In any case I certainly understand what your saying as I frequently have a similar discussion with my son who is currently in college.

I was trying to understand the issue and testing...I do not normally play two games at once. I still do not understand why Esc/alt tab will mute the music for me but not pmnox?
Maybe you are using a different operating system?
I use windows 7 64 bit with 64 bit version of Factorio.

SilverWarior
Filter Inserter
Filter Inserter
Posts: 559
Joined: Mon Mar 04, 2013 9:23 am
Contact:

Re: mute the game while alt-tabbed

Post by SilverWarior »

Just do some testing on this.
After you puse the game the music will continue playing until the end of current song. Next song won't start playing until you resume the game. And you don't even need to ALT+TAB for this.

Also I did some checking and even paused Factorio game which is being kept running in the bacground uses from 10 to 20 percent of my CPU power and somwhere around 30 percent of my GPU power all based on Sysinternals Process Eplorer.
And this is not just some minor processing usage. This can affect playing of some other games on my computer quite a bit. But then this is no gamin laptop even thou I can still run most of the games I just have to keep low settings.

My computer configuration:
Laptop Acer Aspire 6530G
AMD Turion X2 Dual Core 2.0 GHz
ATI Mobility Radeon HD 3650
4GB RAM
Windows 7 Ultimate 64bit

chainedlupine
Inserter
Inserter
Posts: 48
Joined: Mon May 19, 2014 4:35 am
Contact:

Re: mute the game while alt-tabbed

Post by chainedlupine »

Just to chime in... I'd like to see the music pause when the game is alt-tabbed. I'm running Factorio v0.9.8 Windows 64-bit build.

Everything else pauses, it's just the music which continues playing until the current song is over, then all sound from Factorio stops.

dryswabbie
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Jul 23, 2017 8:00 pm
Contact:

Option to disable sounds when game not in focus

Post by dryswabbie »

Would like an option to disable Factorio sounds when the game is not in focus (in background).

I like the sounds when actively playing, but not when I have Factorio in the background while doing other computery things. Hearing the drone of the machinery while on Skype or YouTube can be annoying.

I would recommend the option be named "Background Sound" (Dota) or "Sound Plays While In Background" (Overwatch). Default should be checked (true).

Behavior:
  • User enters Options -> Sounds, then deselects the background sound option.
  • When game not the active window according to the operating system, sound from game is muted.
  • Upon Factorio becoming the active window, sound should be restored.
I do believe the current behaviour should remain the default setting.

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7329
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Option to disable sounds when game not in focus

Post by bobingabout »

I've noticed this in a lot of games. Some force it, rather than being an option.

Some games that force it, I would want the sounds to play in the background, because I'm listening out for certain alerts.

But some sort of option for it in factorio, yes, I would like to see that.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

User avatar
MarvinCZ
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Fri Jun 03, 2016 7:11 pm
Contact:

Option to mute sounds when game window is not focused

Post by MarvinCZ »

Hi factorio team, would it be please possible to mute game sounds automaticaly when game window has no focus?

Sometimes I like to keep factorio running in window on one screen while for example watching movie on another and the game sounds are a bit disturbing at that moment.
Going every time to sound settings to set volume all the way down (and then back) could get a bit tedious from time to time.

Or at least making this behavior configurable in game settings would be absolutely great. :)

Thank you very much for considering this feature

User avatar
Gergely
Filter Inserter
Filter Inserter
Posts: 549
Joined: Sun Apr 10, 2016 8:31 pm
Contact:

Re: Option to mute sounds when game window is not focused

Post by Gergely »

Seconded.

mrvn
Smart Inserter
Smart Inserter
Posts: 4487
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Option to mute sounds when game window is not focused

Post by mrvn »

Thirded or whatever you call that.

A mute hotkey would be nice too. Other than leaving factorio running while watching a movie sometimes my telephon rings and I want quite so I can hear the other person talk.

User avatar
MarvinCZ
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Fri Jun 03, 2016 7:11 pm
Contact:

Re: Option to mute sounds when game window is not focused

Post by MarvinCZ »

mrvn wrote:A mute hotkey would be nice too.
Yes, keyboard shortcut for toggling sounds/music would be also super cool. :)

PacifyerGrey
Smart Inserter
Smart Inserter
Posts: 1046
Joined: Wed Jun 29, 2016 10:02 am
Contact:

Re: Option to mute sounds when game window is not focused

Post by PacifyerGrey »

This would be really usefull. Upvoting. And it is really easy to implement.

User avatar
MarvinCZ
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Fri Jun 03, 2016 7:11 pm
Contact:

Re: Option to mute sounds when game window is not focused

Post by MarvinCZ »

I agree it shouldn't be so much complicated to implement this option.
Let's hope it will make it to factorio sometime soon. It would be really useful feature.

Or if not this focus-based option (which would be better) at least have a keyboard shortcut to mute game sounds.

Post Reply

Return to “Outdated/Not implemented”