SSB Modulator: interim state (3)

This commit is contained in:
f4exb 2016-12-13 01:33:25 +01:00
parent 915a73e509
commit 604db50b2b
1 changed files with 10 additions and 10 deletions

View File

@ -190,27 +190,27 @@ void SSBMod::pullAF(Complex& sample)
if (m_ifstream.eof())
{
sample.real() = 0.0f;
sample.imag() = 0.0f;
sample.real(0.0f);
sample.imag(0.0f);
}
else
{
Real real;
m_ifstream.read(reinterpret_cast<char*>(&real), sizeof(Real));
sample.real() = real * m_running.m_volumeFactor;
sample.imag() = 0.0f;
sample.real(real * m_running.m_volumeFactor);
sample.imag(0.0f);
}
}
else
{
sample.real() = 0.0f;
sample.imag() = 0.0f;
sample.real(0.0f);
sample.imag(0.0f);
}
break;
case SSBModInputAudio:
m_audioFifo.read(reinterpret_cast<quint8*>(audioSample), 1, 10);
sample.real() = ((audioSample[0] + audioSample[1]) / 65536.0f) * m_running.m_volumeFactor;
sample.imag() = 0.0f;
sample.real(((audioSample[0] + audioSample[1]) / 65536.0f) * m_running.m_volumeFactor);
sample.imag(0.0f);
break;
case SSBModInputCWTone:
if (m_cwKeyer.getSample())
@ -219,8 +219,8 @@ void SSBMod::pullAF(Complex& sample)
}
else
{
sample.real() = 0.0f;
sample.imag() = 0.0f;
sample.real(0.0f);
sample.imag(0.0f);
m_toneNco.setPhase(0);
}
break;