From 1cc261e9028a627fedb36e1e2887ac9d9747ef98 Mon Sep 17 00:00:00 2001 From: Eidolon Date: Mon, 20 Jan 2025 22:00:14 -0600 Subject: [PATCH] Check for input devices before opening them --- src/sdl/new_sound.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sdl/new_sound.cpp b/src/sdl/new_sound.cpp index 6f8835a9c..8ec0f604d 100644 --- a/src/sdl/new_sound.cpp +++ b/src/sdl/new_sound.cpp @@ -992,6 +992,11 @@ boolean I_SoundInputSetEnabled(boolean enabled) { if (g_input_device_id == 0 && enabled) { + if (SDL_GetNumAudioDevices(true) == 0) + { + return false; + } + SDL_AudioSpec input_desired {}; input_desired.format = AUDIO_F32SYS; input_desired.channels = 1;