SDL
SDL copied to clipboard
Jittery audio in games using SDL
Have experienced jittery audio in games that use SDL. The games are Wargroove and Super Hexagon. Thought it was an issue with Virtual Audio Cable but it might be Windows 7? no clue.
Can you record it so I can hear what "jittery" means in this case? Even just like a voice memo on your phone while Super Hexagon is playing would be helpful.
Thanks!
https://www.file.io/oLwQ/download/zdpq4tGaI1Q6 Sorry about the external site. Github doesn't like .MKVs. 2022-05-30 14-51-27.mkv shows off what it sounds like in previous versions and in the current version with a launch argument 2022-05-30 14-52-06.mkv shows off what it sounds like in the current version without a launch argument
Edit: https://www.file.io/PvGM/download/yq4aJHajWtRF File 2022-05-30 15-01-14.mkv shows off what might be the same issue but with Wargroove
Linking the SupHex report, just in case https://github.com/TerryCavanagh/super-hexagon-neo-issues/issues/6
DirectSound works around it, so it's some interaction between VAC and WASAPI.
I'm going to roll a Win7+VAC install later, but for now:
Launch the Control Panel:
Launch System:
Then Advanced System Settings:
Advanced tab, Environment Variables...
New System Variable:
Add SDL_AUDIODRIVER and directsound and click OK
Click OK to close out of all these windows and REBOOT and then SDL will use DirectSound instead of WASAPI for all games. Until we fix this better, this should get you up and going everywhere.
No luck with the system variable fix. Either a mistake on my part to open this as a SDL issue or something else.
Looks right to me, might just need a reboot.
reboot occurred but audio issues remained
So the Super Hexagon command line that fixed this just forces that variable inside the game, as far as I know. Maybe Steam or whatever strips it out?
Anyhow, I'll know more when I do a Win7 install over here soon.
I threw together a Win7 install last night in preparation to look into this issue; just making sure, this is the Virtual Audio Cable we're talking about, right?
https://vac.muzychenko.net/en/
Yep, that's the one.
I was using the VB Audio Cable from https://shop.vb-audio.com/en/12-win-apps, https://shop.vb-audio.com/en/ and Voicemeeter Potato from the same person. Unable to continue describing the error now as I have built a new PC and swapped OS
(That's why I asked, VB Audio Cable is the first hit on Google for "Virtual Audio Cable")
@TheMagicJesus No worries, I'll try and reproduce the issue here if I can! Enjoy the new PC! :)
Okay, so my results are:
- With Super Hexagon, this segfaults inside the game (not SDL) as soon as the voice tries to say "Super Hexagon!" at the title screen. I don't have symbols, so I don't have more to say here and I don't think this is worth the Super Hexagon developers spending more time on.
- Firefox won't play sound at all, but doesn't crash.
- The original report was jittery audio in some games.
I'm willing to decide this is memory corruption, or whatever...a bug in the virtual audio cable or some quirk of Windows 7, but I don't think it's our bug and I don't think it's worth spending more time on, especially if the original reporter has moved on to a new system build-out and doesn't suffer this issue any more and no one else is triggering it.
If it pops up again from another report, we'll revisit, but for now, this is getting closed.
So, good news - we have someone on Windows 7 with VAC on the system and it has this bug, so we can probably try investigating this again.
Bad news: It's actually the opposite backends having the issue, WASAPI is fine and DirectSound is not. I'll have @michaelarts post here with more information soon.
Hey everyone!
The machine I'm experiencing this on is an HP EliteBook 8760w and I'm using all of the default audio hardware that came with it. Windows says the audio drivers are up to date. Here's a screenshot of the sound device info:
(Saw this was still open while sorting through old milestones.)
I still think this is a Virtual Audio Cable bug, so for now I'm going to close this again. If it still presents when Virtual Audio Cable is uninstalled, or if the VAC people say "ah, we tried to debug this on our end and SDL is doing this stupid thing instead of a more correct behavior," (which is always possible!) we can revisit this.