mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-03-24 13:18:29 -04:00
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())
|
||||
{
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user