-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
audio: Accurate audio output timing. #1986
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
Conversation
This should fix #1717 for everyone |
f8ce208
to
3ed5149
Compare
Satisfied with the handling of SDL queue stalling now. This can occur if the audio device changes, for example, causing frames to back up within the queue and latency to grow if left unchecked. |
a0a225c
to
b1b24e0
Compare
Please check again. |
b1b24e0
to
d2d1a3c
Compare
@squidbus I can confirm that after your changes in this build sound works properly for me. Thank you so much! ;-) |
d2d1a3c
to
3c86a99
Compare
this seems to work fine. I am really sorry about cubeb removal only ;/ |
The code is still in history so we can bring it back later if we need it, but I don't see a point in having it currently if there's no differences and some people report random crashes or hangs. |
Well, the difference is in the volume. The sdl is much quieter compared to the cubeb. |
I've never noticed a difference on my system but if this is an issue it can probably be fixed for SDL. |
It's an issue already reported yes |
Here's a demonstration of the two sound systems https://youtu.be/6Pe7JuQOjTg |
I've also experienced the SDL being abnormally quiet issue, and for me it affect all games. So it's not Bloodborne specific. |
Just wanted to note down my experiences on PipeWire + Wayland + Arch Linux. I previously had audio issues with Bloodborne (CUSA03173) on the SDL backend, which were fixed by the cubeb backend. Now, after testing the latest main branch (i.e. after this PR was merged), there are no audio issues for me on the SDL backend. |
I'm using gentoo linux with pulseaudio. Before this was merged I hadn't had audio troubles. When cubec was introduced, I noticed increased audio lag, but otherwise no problems.
Very rarely I do get sound, and no "audio queue backed up" lines at all. This seems to happen randomly. This is my shad_log file: |
This reverts commit 48c51bd. # Conflicts: # src/common/config.cpp
Implements accurate timing for audio output, using a single-buffer queue same as the actual audio out library and a thread to manage audio timing.
This also removes cubeb for now at least as with this fix, SDL seems to be working just as well, and debugging is simpler if we just have to worry about one audio backend configuration. We can re-add this in the future if needed but for some Windows users it seems to be resulting in strange crashes.
Needs testing with various OSes and games to make sure this works for all audio systems, as the timing might be tight. From my testing it seems to work pretty well on Mac.