fixed audio source crashing if no device is available

pull/1613/head
AlexandreRouma 2025-02-14 00:43:32 +01:00
rodzic 993bf9128c
commit f90e2d53a7
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -183,6 +183,9 @@ private:
static void start(void* ctx) {
AudioSourceModule* _this = (AudioSourceModule*)ctx;
if (_this->running) { return; }
// If no device is selected, give up
if (_this->selectedDevice.empty()) { return; }
// Stream options
RtAudio::StreamParameters parameters;