i_soundinbackground has side-effects

Is there something that doesn't work right in the latest GZDoom? Post about it here.

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!

i_soundinbackground has side-effects

Postby 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.
User avatar
phantombeta
In the meadow of sinful thoughts, every flower's a perfect one
 
Joined: 02 May 2013
Location: Brazil, South America, Earth, Orion-Cygnus Arm, Milky Way
Discord: phantombeta#2461
Twitch ID: phantombeta_
Github ID: Doom2fan
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: i_soundinbackground has side-effects

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

WTF???
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: i_soundinbackground has side-effects

Postby 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.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Location: This post
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: i_soundinbackground has side-effects

Postby 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.
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: i_soundinbackground has side-effects

Postby 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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: i_soundinbackground has side-effects

Postby 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?
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: i_soundinbackground has side-effects

Postby 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.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Location: This post
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: i_soundinbackground has side-effects

Postby 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. :) :?
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: i_soundinbackground has side-effects

Postby 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.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Location: This post
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: i_soundinbackground has side-effects

Postby 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.
Gez
 
 
 
Joined: 06 Jul 2007


Return to Bugs

Who is online

Users browsing this forum: No registered users and 0 guests