i_soundinbackground has side-effects

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!

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is ON
[img] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: i_soundinbackground has side-effects

Re: i_soundinbackground has side-effects

by Gez » Thu Jan 23, 2020 1:23 pm

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.

Re: i_soundinbackground has side-effects

by Rachael » Thu Jan 23, 2020 9:30 am

It should probably be in the main loop where it checks whether the menu or pause is active, not in the sound code.

Re: i_soundinbackground has side-effects

by drfrag » Thu Jan 23, 2020 9:21 am

That's why i'm asking where it should be. So i still don't see it as a side effect. :) :?

Re: i_soundinbackground has side-effects

by Rachael » Thu Jan 23, 2020 9:05 am

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?
drfrag... you're missing the whole point.

The code that pauses the game is in the sound code, itself. It doesn't belong there.

Re: i_soundinbackground has side-effects

by drfrag » Thu Jan 23, 2020 9:03 am

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?

Re: i_soundinbackground has side-effects

by Graf Zahl » Thu Jan 23, 2020 8:15 am

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.

Re: i_soundinbackground has side-effects

by drfrag » Thu Jan 23, 2020 8:06 am

Graf Zahl wrote:WTF???
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.

Re: i_soundinbackground has side-effects

by Rachael » Thu Jan 23, 2020 8:03 am

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.

Re: i_soundinbackground has side-effects

by Graf Zahl » Thu Jan 23, 2020 6:34 am

WTF???

i_soundinbackground has side-effects

by phantombeta » Thu Jan 23, 2020 6:30 am

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.

Top