diff options
author | falsidge <falsidge@users.noreply.github.com> | 2023-06-27 12:31:41 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-27 21:31:41 +0200 |
commit | 52d6265b5840b0d36e65040ac33b1d6476b4b8b9 (patch) | |
tree | 6b2feba806ace0bb47486dc8effc84dd3458aa19 /src/frontend/qt_sdl/AudioInOut.cpp | |
parent | 4b32fb802c1e3e30bbdc1825828611d5a166b57f (diff) |
Add microphone combobox using SDL (#1709)
Diffstat (limited to 'src/frontend/qt_sdl/AudioInOut.cpp')
-rw-r--r-- | src/frontend/qt_sdl/AudioInOut.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/frontend/qt_sdl/AudioInOut.cpp b/src/frontend/qt_sdl/AudioInOut.cpp index e63db1a..395dcf8 100644 --- a/src/frontend/qt_sdl/AudioInOut.cpp +++ b/src/frontend/qt_sdl/AudioInOut.cpp @@ -133,7 +133,12 @@ void MicOpen() whatIwant.channels = 1; whatIwant.samples = 1024; whatIwant.callback = MicCallback; - micDevice = SDL_OpenAudioDevice(NULL, 1, &whatIwant, &whatIget, 0); + const char* mic = NULL; + if (Config::MicDevice != "") + { + mic = Config::MicDevice.c_str(); + } + micDevice = SDL_OpenAudioDevice(mic, 1, &whatIwant, &whatIget, 0); if (!micDevice) { Platform::Log(Platform::LogLevel::Error, "Mic init failed: %s\n", SDL_GetError()); |