mirror of https://github.com/f4exb/sdrangel.git
SSB Modulator: interim state (3)
This commit is contained in:
parent
915a73e509
commit
604db50b2b
|
@ -190,27 +190,27 @@ void SSBMod::pullAF(Complex& sample)
|
||||||
|
|
||||||
if (m_ifstream.eof())
|
if (m_ifstream.eof())
|
||||||
{
|
{
|
||||||
sample.real() = 0.0f;
|
sample.real(0.0f);
|
||||||
sample.imag() = 0.0f;
|
sample.imag(0.0f);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Real real;
|
Real real;
|
||||||
m_ifstream.read(reinterpret_cast<char*>(&real), sizeof(Real));
|
m_ifstream.read(reinterpret_cast<char*>(&real), sizeof(Real));
|
||||||
sample.real() = real * m_running.m_volumeFactor;
|
sample.real(real * m_running.m_volumeFactor);
|
||||||
sample.imag() = 0.0f;
|
sample.imag(0.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sample.real() = 0.0f;
|
sample.real(0.0f);
|
||||||
sample.imag() = 0.0f;
|
sample.imag(0.0f);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SSBModInputAudio:
|
case SSBModInputAudio:
|
||||||
m_audioFifo.read(reinterpret_cast<quint8*>(audioSample), 1, 10);
|
m_audioFifo.read(reinterpret_cast<quint8*>(audioSample), 1, 10);
|
||||||
sample.real() = ((audioSample[0] + audioSample[1]) / 65536.0f) * m_running.m_volumeFactor;
|
sample.real(((audioSample[0] + audioSample[1]) / 65536.0f) * m_running.m_volumeFactor);
|
||||||
sample.imag() = 0.0f;
|
sample.imag(0.0f);
|
||||||
break;
|
break;
|
||||||
case SSBModInputCWTone:
|
case SSBModInputCWTone:
|
||||||
if (m_cwKeyer.getSample())
|
if (m_cwKeyer.getSample())
|
||||||
|
@ -219,8 +219,8 @@ void SSBMod::pullAF(Complex& sample)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sample.real() = 0.0f;
|
sample.real(0.0f);
|
||||||
sample.imag() = 0.0f;
|
sample.imag(0.0f);
|
||||||
m_toneNco.setPhase(0);
|
m_toneNco.setPhase(0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue