mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-24 23:36:00 +03:00
[PR #1986] [MERGED] audio: Accurate audio output timing. #2421
Labels
No labels
Bloodborne
bug
contributor wanted
documentation
enhancement
frontend
good first issue
help wanted
linux
pull-request
question
release
verification progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shadPS4#2421
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/shadps4-emu/shadPS4/pull/1986
Author: @squidbus
Created: 12/30/2024
Status: ✅ Merged
Merged: 12/31/2024
Merged by: @georgemoralis
Base:
main← Head:audio-timing📝 Commits (3)
cf4bd54audio: Accurate audio output timing.3a02d28audio: Handle SDL audio queue stalls.3c86a99audio: Format info cleanup.📊 Changes
15 files changed (+170 additions, -821 deletions)
View changed files
📝
.gitmodules(+0 -4)📝
CMakeLists.txt(+1 -4)➖
LICENSES/ISC.txt(+0 -7)📝
externals/CMakeLists.txt(+0 -10)➖
externals/cubeb(+0 -1)📝
src/common/config.cpp(+0 -17)📝
src/common/config.h(+0 -2)➖
src/common/ringbuffer.h(+0 -374)📝
src/core/libraries/audio/audioout.cpp(+82 -158)📝
src/core/libraries/audio/audioout.h(+32 -13)📝
src/core/libraries/audio/audioout_backend.h(+4 -17)➖
src/core/libraries/audio/cubeb_audio.cpp(+0 -174)📝
src/core/libraries/audio/sdl_audio.cpp(+51 -11)📝
src/qt_gui/settings_dialog.cpp(+0 -6)📝
src/qt_gui/settings_dialog.ui(+0 -23)📄 Description
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.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.