mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-09-01 02:51:41 +00:00
native ps4 audio sink
This commit is contained in:
@@ -19,6 +19,9 @@
|
||||
#ifdef HAVE_SDL3
|
||||
#include "audio_core/sink/sdl3_sink.h"
|
||||
#endif
|
||||
#ifdef __OPENORBIS__
|
||||
#include "audio_core/sink/ps4_sink.h"
|
||||
#endif
|
||||
#include "audio_core/sink/null_sink.h"
|
||||
#include "common/logging.h"
|
||||
#include "common/settings_enums.h"
|
||||
@@ -51,6 +54,16 @@ struct SinkDetails {
|
||||
|
||||
// sink_details is ordered in terms of desirability, with the best choice at the top.
|
||||
constexpr SinkDetails sink_details[] = {
|
||||
#ifdef __OPENORBIS__
|
||||
SinkDetails{
|
||||
Settings::AudioEngine::Ps4,
|
||||
[](std::string_view device_id) -> std::unique_ptr<Sink> {
|
||||
return std::make_unique<PS4Sink>(device_id);
|
||||
},
|
||||
&ListPS4SinkDevices,
|
||||
&GetPS4Latency,
|
||||
},
|
||||
#endif
|
||||
#ifdef HAVE_OBOE
|
||||
SinkDetails{
|
||||
Settings::AudioEngine::Oboe,
|
||||
@@ -115,7 +128,9 @@ const SinkDetails& GetOutputSinkDetails(Settings::AudioEngine sink_id) {
|
||||
// BEGIN REINTRODUCED FROM 3833 - REPLACED CODE BLOCK ABOVE - DIABLO 3 FIX
|
||||
// Auto-select a backend. Prefer CubeB, but it may report a large minimum latency which
|
||||
// causes audio issues, in that case go with SDL.
|
||||
#if defined(HAVE_CUBEB) && defined(HAVE_SDL3)
|
||||
#if defined(__OPENORBIS__)
|
||||
iter = find_backend(Settings::AudioEngine::Ps4);
|
||||
#elif defined(HAVE_CUBEB) && defined(HAVE_SDL3)
|
||||
iter = find_backend(Settings::AudioEngine::Cubeb);
|
||||
if (iter->latency() > TargetSampleCount * 3) {
|
||||
iter = find_backend(Settings::AudioEngine::Sdl3);
|
||||
|
||||
Reference in New Issue
Block a user