1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-03 06:24:48 -04:00

Fixed narrowing warning when Rx sample size is 16 bits

This commit is contained in:
f4exb
2020-11-24 00:02:44 +01:00
parent 4059a0be27
commit ce2aad5a7a
4 changed files with 14 additions and 14 deletions
+5 -6
View File
@@ -453,12 +453,11 @@ void DSPDeviceMIMOEngine::workSamplesSource(SampleVector& data, unsigned int iBe
begin,
begin,
[this](Sample& a, const Sample& b) -> Sample {
int den = m_sumIndex + 1; // at each stage scale sum by n/n+1 and input by 1/n+1
int nom = m_sumIndex; // so that final sum is scaled by N (number of channels)
return Sample{
a.real()/den + nom*(b.real()/den),
a.imag()/den + nom*(b.imag()/den)
};
FixReal den = m_sumIndex + 1; // at each stage scale sum by n/n+1 and input by 1/n+1
FixReal nom = m_sumIndex; // so that final sum is scaled by N (number of channels)
FixReal x = a.real()/den + nom*(b.real()/den);
FixReal y = a.imag()/den + nom*(b.imag()/den);
return Sample{x, y};
}
);
}