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

CS2 - Running audio capture applications prevent audio from playing #3312

Closed
SolsticeSpectrum opened this issue Sep 28, 2023 · 9 comments
Closed

Comments

@SolsticeSpectrum
Copy link

SolsticeSpectrum commented Sep 28, 2023

Your system information

  • System information from steam: system info gist
  • Have you checked for system updates?: Yes

Please describe your issue in as much detail as possible:

If the game is started while an audio capture application such as Discord runs in the background, the game will run without any aduio. The only fix is then closing Discord, the game and Steam. If Steam is not closed too, it will run without audio even when Discord has been closed already. This is annoying because I basically have to make sure I run the apps in correct order.

Something I tried:

Based on a suggestion in other issue I tried creating .asoundrc

ctl.dmixer {
type pulse
}
pcm.pulse {
type pulse
}
ctl.pulse {
type pulse
}
pcm.!default {
type pulse
}
ctl.!default {
type pulse
}

This didn't work however, I do have pulseaudio

Steps for reproducing this issue:

  1. Start Discord
  2. Run the game
@lou-perret
Copy link

Start the game with -sdlaudiodriver pipewire

@SolsticeSpectrum
Copy link
Author

Start the game with -sdlaudiodriver pipewire

I have pulseaudio

@JacKeTUs
Copy link

JacKeTUs commented Sep 28, 2023

Try -sdlaudiodriver pulseaudio instead for now. Or, if you can, try install pipewire and use it instead. Or just wait for the fix

It's related to that issue #3256
CS2 with sdl3 tries to use ALSA sound system by default, and tries to grab the device exclusively. When discord running, audio device can't be grabbed exclusively and you have no audio. Using other sdlaudiodriver helps

Valve devs are aware of the issue, and in Dota2 issue here: ValveSoftware/Dota-2#2491 (comment) they mentioned that they are working for the fix

@icculus
Copy link
Collaborator

icculus commented Sep 28, 2023

Yeah, I think this will be solved by ValveSoftware/Dota-2#2491 when Pulse support is fixed. Please retest once that fix is in place!

@parona-source
Copy link

#3312 (comment)

#3256 (comment) Should work now.

@SolsticeSpectrum
Copy link
Author

SolsticeSpectrum commented Sep 29, 2023

#3312 (comment)

#3256 (comment) Should work now.

Yes the latest update fixed my issue

EDIT: The audio works in main menu but not in the game, when I tried switching between output devices to possibly fix it, it crashed the game and I got penalty because it was hanged for several minutes

@Xinayder
Copy link

Xinayder commented Sep 29, 2023

I have a weird issue related to audio as well. I was playing a match today while talking on Discord, I noticed that after a few rounds, the audio would get out of sync. Restarting the game fixed the issue temporarily, then the audio was delayed again. These were the startup parameters I used:

mangohud gamemoderun %command% -sdlaudiodriver pipewire -borderless -novid -nojoy -freq 75 -high -threads 12 -sdlvideodriver wayland

@JacKeTUs
Copy link

JacKeTUs commented Sep 29, 2023

audio was delayed again

I think it's another issue, already opened:
#3283

@SolsticeSpectrum
Copy link
Author

I didn't experience any issues in latest updates so I'll close this one. If I'll find another issue, I'll reopen it

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

7 participants