MCPcopy Create free account
hub / github.com/aethersdr/AetherSDR / resetMissingAudioDevicesToDefault

Method resetMissingAudioDevicesToDefault

src/gui/MainWindow.cpp:3735–3759  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3733}
3734
3735void MainWindow::resetMissingAudioDevicesToDefault(bool resetInput,
3736 bool resetOutput,
3737 bool reinitializePcInput)
3738{
3739 if (!m_audio || (!resetInput && !resetOutput))
3740 return;
3741
3742 QPointer<AudioEngine> audio = m_audio;
3743 const QHostAddress radioAddress = m_radioModel.radioAddress();
3744 const bool restartCapture = reinitializePcInput && !radioAddress.isNull();
3745 QMetaObject::invokeMethod(m_audio, [audio,
3746 resetInput,
3747 resetOutput,
3748 restartCapture,
3749 radioAddress]() {
3750 if (!audio)
3751 return;
3752 if (resetInput)
3753 audio->setInputDevice(QAudioDevice{});
3754 if (resetOutput)
3755 audio->setOutputDevice(QAudioDevice{});
3756 if (restartCapture && !audio->isTxStreaming())
3757 audio->startTxStream(radioAddress, 4991);
3758 }, Qt::QueuedConnection);
3759}
3760
3761// ─── UI Construction ──────────────────────────────────────────────────────────
3762

Callers

nothing calls this directly

Calls 6

isNullMethod · 0.80
setInputDeviceMethod · 0.80
isTxStreamingMethod · 0.80
startTxStreamMethod · 0.80
radioAddressMethod · 0.45
setOutputDeviceMethod · 0.45

Tested by

no test coverage detected