Test source: limit FM deviation to half the sample rate

pull/147/head
f4exb 2018-02-11 18:58:28 +01:00
rodzic 1d9ab62a4a
commit 6f074b39fa
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -173,7 +173,7 @@ void TestSourceThread::setAMModulation(float amModulation)
void TestSourceThread::setFMDeviation(float deviation)
{
float fmDeviationUnit = deviation / (float) m_samplerate;
m_fmDeviationUnit = fmDeviationUnit < 0.0f ? 0.0f : fmDeviationUnit > 1.0f ? 1.0f : fmDeviationUnit;
m_fmDeviationUnit = fmDeviationUnit < 0.0f ? 0.0f : fmDeviationUnit > 0.5f ? 0.5f : fmDeviationUnit;
qDebug("TestSourceThread::setFMDeviation: m_fmDeviationUnit: %f", m_fmDeviationUnit);
}