mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-25 15:56:00 +03:00
[PR #2776] [MERGED] libraries: Initial Audio3d implementation. #2970
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#2970
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/2776
Author: @squidbus
Created: 4/13/2025
Status: ✅ Merged
Merged: 4/14/2025
Merged by: @squidbus
Base:
main← Head:a3d📝 Commits (8)
b98f528feat: Audio3d5bd10c5feat: Audio3d8a50c9aaudio3d: disable outputf0b4afaaudio3d: Implement central Audio3d output.4600680audio3d: Ignore AudioOut already initialized error.0a731b2audio3d: Convert and retain sample buffers when queued.f75f4caaudio3d: Treat object audio as single channel.0f3d3ebaudio3d: Clean up.📊 Changes
8 files changed (+556 additions, -319 deletions)
View changed files
📝
CMakeLists.txt(+0 -2)📝
src/core/libraries/audio/audioout.cpp(+2 -1)📝
src/core/libraries/audio/audioout.h(+9 -1)📝
src/core/libraries/audio3d/audio3d.cpp(+443 -192)📝
src/core/libraries/audio3d/audio3d.h(+102 -92)📝
src/core/libraries/audio3d/audio3d_error.h(+0 -2)➖
src/core/libraries/audio3d/audio3d_impl.cpp(+0 -13)➖
src/core/libraries/audio3d/audio3d_impl.h(+0 -16)📄 Description
Continuing off of https://github.com/shadps4-emu/shadPS4/pull/2694 to get Audio3d to a good-enough state to start getting some games working.
This has a few changes over the PR:
sceAudio3dAudioOut*to use separate audio out handles from queued audio, so that audio properly plays at the same time. This fixes issues in Project DIVA X where the audio would be slow and full of gaps, since the audio was being interleaved instead of overlapped.sceAudio3dBedWrite2, both the format and channel count are respected, and forsceAudio3dObjectSetAttributes, format is respected and number of channels is always 1. In both cases, the audio is properly converted down to the signed 16-bit stereo that Audio3d uses for its primary audio output.sceAudio3dAudioOutCloseandsceAudio3dGetDefaultOpenParameters.With this, Project DIVA X has working audio from my testing. Other testing indicates some more complex games at least have fewer audio issues up to the point they can currently be tested, for example loud garbage audio should be gone in many cases.
There are still many missing features (e.g. handling actual positional audio attributes, some port modes) so I don't expect this to be perfect for many games yet.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.