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

GoldSrc games: distorted audio, black screen #175

Open
OlegAckbar opened this issue Jun 26, 2024 · 3 comments
Open

GoldSrc games: distorted audio, black screen #175

OlegAckbar opened this issue Jun 26, 2024 · 3 comments

Comments

@OlegAckbar
Copy link

goldsrc.webm
@OlegAckbar
Copy link
Author

WARNING: EARRAPE!

@icculus
Copy link
Collaborator

icculus commented Jan 7, 2025

Forcing pulseaudio (or rather, probably forcing anything other than PipeWire) mostly fixes this, see #176.

For HL1, I additionally needed to comment out the SDL2_AUDIO_ALLOW_*_CHANGE code in sdl2-compat so SDL_OpenAudioDevice gets exactly what it requests...it sounds like it didn't handle the sample rate change otherwise and played too fast.

SDL3 refuses to accept really low sample rates during device opens, in case another thing is going to come along and open the device at a higher rate later, so my guess is SDL2 always gave Half-Life 1 the 22050Hz it wanted. When the ALLOW_x_CHANGE flags are ignored, SDL3 just does the sample rate conversion transparently and everything works.

I guess we'll need a quirk for that.

@icculus
Copy link
Collaborator

icculus commented Jan 7, 2025

No idea what's up with the black screen, but it's probably either loading the wrong GL library or the 32-bit binary is failing to get the right GL driver or something. Notably, 32-bit Counter-Strike: Source is rendering, though, so I don't know.

This is written to the console at startup, though:

Successfully compiled "gl_shaders/vs_world.vert"

Successfully compiled "gl_shaders/fs_world.frag"

ERROR: failed to link program!

Compiler reported: error: vertex shader lacks `main'

Without sdl2-compat (which might actually be some other LD_LIBRARY_PATH trickery that I broke trying to wedge sdl2-compat into this, and not sdl2-compat itself!), this writes...

Successfully compiled "gl_shaders/vs_world.vert"

Successfully compiled "gl_shaders/fs_world.frag"

Successfully linked program!

...and the intro screen and main menu renders.

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

No branches or pull requests

2 participants