-
Notifications
You must be signed in to change notification settings - Fork 400
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
Sound is stuttering for both adlib and soundblaster emulation with sdl2-compat #5444
Comments
I also noticed that pc speaker output is disabled. A side effect of the sound stuttering? |
Now sdl2-compat is provided on stable repositories on Archlinux, see https://archlinux.org/packages/extra/x86_64/sdl2-compat/ . So this bug will be heard by anyone building dosbox-x with sdl2 gui. |
I built both sdl2-compat and dosbox-x-sdl with debug symbols. So I can have a full error log. On the attached, I launched dosbox-x-sdl2 (with --debug command line option), go to c: and launch shareware version of Attack of the Petscii Robots. I hope this log will help a little :) Wanting some more logs, I tried the small tetris like call Tetro you can find here: https://artificialraccoon.itch.io/tetro-dos In the log I got, there is a lot of SBLASTER:Raising IRQ lines. Adding the log if it can help. |
This bug was uncovered by sdl2-compat but is technically a bug in DOSBox-X and may be causing issues on other setups elsewhere. Closes joncampbell123#5444
I wrote a fix PR for this bug but it broke SDL1 support and I'm not interested in changing all the headers around, so waiting for sdl2-compat to work around this bug and hope it doesn't affect real sdl2 systems is probably the best bet. |
I understand you don't want to change everything and introduce breaking changes for "old" sdl2 support. Thanks anyway for your help. Have a good day. |
I also have the audio issue with DOSBox-X, and I also can't compile it with SDL2 anymore (v2025.01.01, SDL1 does work). I haven't tried compiling the latest revision yet so this is just anecdotal until I can collect more details. It looks like there are multiple issues with sdl2-compat at the moment. The Arch package maintainers might have jumped the gun on this one. https://gitlab.archlinux.org/archlinux/packaging/packages/sdl2-compat/-/issues/1 has a discussion on some found issues and just a few minutes ago a SDL developer responded that they are working on what's reported there, and actively monitoring the thread. If someone could report this issue there, it might be picked up soon. (I would do it myself but I need to request an user account for the bug tracker first) |
I made changes last night to use the newer SDL_AudioDevice stuff for SDL2. Is that failing to compile? |
@joncampbell123 I was having issues with compiling the latest release (v2025.01.01). Your latest commit compiles fine, and I would even say it fixes the audio issue I had but I will test it more thoroughly. Thanks for your work on this :) |
Thanks for the bug on Archlinux tracker. Following it. And thanks for the fix too. I thought I fixed it by using sdl2-compat-git, but not. Building code at commit 75aa320 give me a working dosbox-x sdl2 audio again :) Thanks, thanks, thanks :) |
I've played a few different games now (for about 90 minutes in total) and everything seems fine! I played some Adlib games (Prince of Persia 1, Skyroads), Sound Blaster (Doom, Fragile Allegiance) and MT-32 (Secret of Monkey Island) and didn't notice anything off about the sound. (This is on Arch Linux with "sdl2-compat 2.30.51-1" and "sdl3 3.2.0-1", and revision 75aa320) I wonder if this this issue should still be reported to sdl2-compat? Because changes had to be made to keep DOSBox-X compatible with "SDL2" |
For whatever reason SDL3 is revealing some latent bugs in software like DOSBox, Counterstrike and other applications where they assumed SDL2 never changed the requested sound format. sdl2-compat 2.30.52 will work around this, but it's worth fixing anyway in case any real world SDL2 setups are broken from this bug. |
In the latest code, if SDL doesn't return the format requested, it simply closes the SDL device and gives up. So at least there should be no more super loud noise. |
I tested the new sdl2-compat (2.30.52-1 on Arch) and sdl3 (3.2.2-1) releases and they seem to fix the original issue. The current release (v2025.02.01) still sounds fine, as expected. On top of that I was now also able to compile the v2025.01.01 release, which gave compilation errors before, and even there the audio works like old again. So the workaround they implemented seems to work well. I would say that this issue has been fully resolved :) |
This issue can be closed. |
Describe the bug
Hello.
Since sdl2-compat landed on archlinux testing, besides building bugs, I noticed the sound is horribly stuttering when playing game using adlib / sound blaster 16 for audio. I built dosbox-x with sdl2 based on commit bbd3f69
I tried with shareware versions of Epic Pinball - https://archive.org/details/Epic-pinball-sw1 - and Attack of the Petscii Robots - https://www.the8bitguy.com/25753/petscii-robot-shareware-available/ - and I recorded a video so you can hear the bug in action.
https://peertube.pcservice46.fr/w/bMGqfw9a3d7hMLSSSAgN2Q
Sorry for the peertube link, I "close" my youtube channel years ago.
Of course, I verified with dosbox-x sdl1 and classic sdl2 are working perfectly
Steps to reproduce the behaviour
Expected behavior
Audio output clean, no stuttering
What operating system(s) this bug have occurred on?
Archlinux
What version(s) of DOSBox-X have this bug?
commit bbd3f69
Used configuration
Output log
Additional information
No response
Have you checked that no similar bug report(s) exist?
Code of Conduct & Contributing Guidelines
The text was updated successfully, but these errors were encountered: