diff options
| author | liamwhite <liamwhite@users.noreply.github.com> | 2022-10-13 20:12:22 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-13 20:12:22 -0400 |
| commit | 048d3e2404d0640235cc446b49f0f96f730de47d (patch) | |
| tree | 8ef858e60147963097eb0ca889ebc84ca4df7182 /src/audio_core/sink/sdl2_sink.cpp | |
| parent | 3c925a72826823139c707a415a73dd95940ca41a (diff) | |
| parent | 8c9e238a7baef2c3f8a9a608ec8bebeeccfa6676 (diff) | |
Merge pull request #9039 from Kelebek1/auto_backend
Auto select the SDL audio backend when Cubeb latency is too high
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 |
