diff options
| author | Kelebek1 <eeeedddccc@hotmail.co.uk> | 2022-10-08 19:27:54 +0100 |
|---|---|---|
| committer | Kelebek1 <eeeedddccc@hotmail.co.uk> | 2022-10-09 13:47:59 +0100 |
| commit | 8c9e238a7baef2c3f8a9a608ec8bebeeccfa6676 (patch) | |
| tree | 1e13efa4263c8e06c28787175f54e57b39fe33dd /src/audio_core/sink/sdl2_sink.cpp | |
| parent | 61883d8820c057259c6c6113934a44f69742164c (diff) | |
Choose the SDL audio backend when Cubeb reports too high of a latency
Diffstat (limited to 'src/audio_core/sink/sdl2_sink.cpp')
| -rw-r--r-- | src/audio_core/sink/sdl2_sink.cpp | 10 |
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 |
