summaryrefslogtreecommitdiffstats
path: root/src/audio_core/sink/sdl2_sink.cpp
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2022-10-14 02:12:22 +0200
committerGitHub <noreply@github.com>2022-10-14 02:12:22 +0200
commit048d3e2404d0640235cc446b49f0f96f730de47d (patch)
tree8ef858e60147963097eb0ca889ebc84ca4df7182 /src/audio_core/sink/sdl2_sink.cpp
parentMerge pull request #9032 from liamwhite/stub-friends (diff)
parentChoose the SDL audio backend when Cubeb reports too high of a latency (diff)
downloadyuzu-048d3e2404d0640235cc446b49f0f96f730de47d.tar
yuzu-048d3e2404d0640235cc446b49f0f96f730de47d.tar.gz
yuzu-048d3e2404d0640235cc446b49f0f96f730de47d.tar.bz2
yuzu-048d3e2404d0640235cc446b49f0f96f730de47d.tar.lz
yuzu-048d3e2404d0640235cc446b49f0f96f730de47d.tar.xz
yuzu-048d3e2404d0640235cc446b49f0f96f730de47d.tar.zst
yuzu-048d3e2404d0640235cc446b49f0f96f730de47d.zip
Diffstat (limited to 'src/audio_core/sink/sdl2_sink.cpp')
-rw-r--r--src/audio_core/sink/sdl2_sink.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/audio_core/sink/sdl2_sink.cpp b/src/audio_core/sink/sdl2_sink.cpp
index 1bd001b94..f12ebf7fe 100644
--- a/src/audio_core/sink/sdl2_sink.cpp
+++ b/src/audio_core/sink/sdl2_sink.cpp
@@ -47,11 +47,7 @@ public:
spec.freq = TargetSampleRate;
spec.channels = static_cast<u8>(device_channels);
spec.format = AUDIO_S16SYS;
- if (type == StreamType::Render) {
- spec.samples = TargetSampleCount;
- } else {
- spec.samples = 1024;
- }
+ spec.samples = TargetSampleCount * 2;
spec.callback = &SDLSinkStream::DataCallback;
spec.userdata = this;
@@ -240,4 +236,8 @@ std::vector<std::string> ListSDLSinkDevices(bool capture) {
return device_list;
}
+u32 GetSDLLatency() {
+ return TargetSampleCount * 2;
+}
+
} // namespace AudioCore::Sink