The "i_soundinbackground" CVar also makes the game not automatically pause when focus is lost in single-player. Why, you ask? Because someone though it'd be a good idea to handle it inside S_SetSoundPaused.
Not sure why anyone thought this was a good idea, but ok.
i_soundinbackground has side-effects
Moderator: GZDoom Developers
Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.
If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.
Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.
If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.
Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!
-
- Posts: 2038
- Joined: Thu May 02, 2013 1:27 am
- Graphics Processor: nVidia with Vulkan support
- Location: Brazil
-
- Lead GZDoom+Raze Developer
- Posts: 48598
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
-
- Admin
- Posts: 13259
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: i_soundinbackground has side-effects
Ooof. And here I was assuming that code didn't resort to such a hack.
If I am to be completely honest though - when this gets fixed I still would prefer to have the game run in the background, even if that's segregated into an option.
If I am to be completely honest though - when this gets fixed I still would prefer to have the game run in the background, even if that's segregated into an option.
-
- Vintage GZDoom Developer
- Posts: 3117
- Joined: Fri Apr 23, 2004 3:51 am
- Location: Spain
Re: i_soundinbackground has side-effects
What do you mean? If the game is paused how could you have sound in the background? Besides vid_active in background doesn't prevent the game from being paused.Graf Zahl wrote:WTF???
-
- Lead GZDoom+Raze Developer
- Posts: 48598
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: i_soundinbackground has side-effects
The issue here clearly is that the playsim isn't paused - it's clear that it cannot pause the engine, but that's a completely different thing.
-
- Vintage GZDoom Developer
- Posts: 3117
- Joined: Fri Apr 23, 2004 3:51 am
- Location: Spain
Re: i_soundinbackground has side-effects
But that's not a side effect, the idea was to have both sound effects and music in the background. The commit was "- implemented 'i_soundinbackground' to continue playing sounds and music while in the background." How to prevent the game from being paused then?
-
- Admin
- Posts: 13259
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: i_soundinbackground has side-effects
drfrag... you're missing the whole point.drfrag wrote:But that's not a side effect, the idea was to have both sound effects and music in the background. The commit was "- implemented 'i_soundinbackground' to continue playing sounds and music while in the background." How to prevent the game from being paused then?
The code that pauses the game is in the sound code, itself. It doesn't belong there.
-
- Vintage GZDoom Developer
- Posts: 3117
- Joined: Fri Apr 23, 2004 3:51 am
- Location: Spain
Re: i_soundinbackground has side-effects
That's why i'm asking where it should be. So i still don't see it as a side effect.



-
- Admin
- Posts: 13259
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: i_soundinbackground has side-effects
It should probably be in the main loop where it checks whether the menu or pause is active, not in the sound code.
-
-
- Posts: 17753
- Joined: Fri Jul 06, 2007 3:22 pm
Re: i_soundinbackground has side-effects
This is something I wanted to complain about, but always just forgot.
I suffered from that while going through Avactor, where the maps are big enough that reloading a save took several seconds, causing me to alt-tab away. The save loading complete was indicated by hearing the marine's shout of pain as some random monster took potshot while I was busy elsewhere.
Anyway now I know I can get the old behavior back by turning off a CVAR.
I suffered from that while going through Avactor, where the maps are big enough that reloading a save took several seconds, causing me to alt-tab away. The save loading complete was indicated by hearing the marine's shout of pain as some random monster took potshot while I was busy elsewhere.
Anyway now I know I can get the old behavior back by turning off a CVAR.