Skip to content

Commit

Permalink
Add warning if sample rate is < 48kHz.
Browse files Browse the repository at this point in the history
  • Loading branch information
srcejon committed Nov 9, 2023
1 parent 27f35fe commit d6f5c81
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plugins/channelrx/demoddsd/dsddemodgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ bool DSDDemodGUI::handleMessage(const Message& message)
DSPSignalNotification& notif = (DSPSignalNotification&) message;
m_deviceCenterFrequency = notif.getCenterFrequency();
m_basebandSampleRate = notif.getSampleRate();
if (m_basebandSampleRate < 48000) {
setStatusText(QString("Sample rate must be >= 48000 Hz (Currently %1 Hz)").arg(m_basebandSampleRate));
} else {
setStatusText("");
}
ui->deltaFrequency->setValueRange(false, 7, -m_basebandSampleRate/2, m_basebandSampleRate/2);
ui->deltaFrequencyLabel->setToolTip(tr("Range %1 %L2 Hz").arg(QChar(0xB1)).arg(m_basebandSampleRate/2));
updateAbsoluteCenterFrequency();
Expand Down

0 comments on commit d6f5c81

Please sign in to comment.