Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Volume set to 0 in Windows after completing demo recording. #727

Open
PolarDawn opened this issue Mar 28, 2021 · 9 comments
Open

Volume set to 0 in Windows after completing demo recording. #727

PolarDawn opened this issue Mar 28, 2021 · 9 comments

Comments

@PolarDawn
Copy link

PolarDawn commented Mar 28, 2021

Background

Version of Crispy Doom:
5.10.0

Operating System and version:
Windows 10 19042

Game: (Doom/Heretic/Hexen/Strife/other)
Doom

Any loaded WADs and mods (please include full command line):
I have a shortcut to Doom with the options "-IWAD IWAD/DOOM.WAD"

Then I call the shortcut:
& '.\DOOM.lnk' -skill 5 -warp 11 -longtics -record demos/e1m1

Bug description

Observed behavior:
Volume in Windows sound mixer is being set to 0 when closing the program.

You get this popup:
image

Volume is set to zero:
image

This means the next time you open Crispy Doom, the volume is set to zero and you have to minimise, adjust the volume, and open again.

Expected behavior:
Volume level shouldn't change

@fabiangreffrath
Copy link
Owner

Is the in-game sfx volume slider (F4) also set to 0?

@PolarDawn
Copy link
Author

No, game volume is fine its just Windows sound mixer.

@PolarDawn
Copy link
Author

PolarDawn commented Apr 3, 2021

Actually, it's when I push escape that it mutes.

https://streamable.com/tk0ozr

If I load the game and I push esc twice the audio volume is fixed (Rather than adjusting in sound mixer)

If I'm not recording, this doesn't happen.

@fabiangreffrath
Copy link
Owner

Ah, I see. If you are recording a demo, entering the menu pauses the game which in turn mutes all audio. If you exit the game in this state, it seems that this muting is preserved.

Could you please confirm that (1) ending a demo recording by pushing 'q' (i.e. without entering the menus) does not trigger this behavior and that (2) quitting a normal non-demo game while paused does trigger it?

@fabiangreffrath
Copy link
Owner

@PolarDawn ping

@fabiangreffrath
Copy link
Owner

Could you please confirm that (1) ending a demo recording by pushing 'q' (i.e. without entering the menus) does not trigger this behavior and that (2) quitting a normal non-demo game while paused does trigger it?

@PolarDawn hello-o?

@fabiangreffrath
Copy link
Owner

Is there anybody else who experiences this bug and can help with my question?

I just tried to reproduce it today, and indeed the Windows sound mixer mutes Crispy as soon as the menu is opened while recording a demo, but resets back to normal the next time I start the game.

@fabiangreffrath
Copy link
Owner

Patch idea:

--- a/src/doom/g_game.c
+++ b/src/doom/g_game.c
@@ -3171,6 +3171,7 @@ boolean G_CheckDemoStatus (void)
        // [crispy] if a new game is started during demo recording, start a new demo
        if (gameaction != ga_newgame)
        {
+       S_ResumeSound(); // [crispy] unmute sound before exiting
        I_Error ("Demo %s recorded",demoname);
        }
        else

@JNechaevsky
Copy link
Collaborator

Sorry for late, I'm here. Yeah, I can reproduce it on my side. Looks likes it happens only while MIDI playback, OPL and GUS seems to be fine.

So far I can report -- nothing wrong happens with volume until I'm not recording a demo. I can exit with both paused/unpaused (or speaking technically, menuactive on/off states).

However, once I'm recording a demo and activating menu or pressing PAUSE, Crispy volume is set to zero in WIndows volume mixer (ingame values aren't changed). But it can return to normal, if I'll change music volume in Sound Menu.

Your patch working fine while active game, but when I'm finishing demo record and starting a new game, volume is again zero-fied.

Probably something wrong with Midiproc?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants