1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-04 06:54:39 -04:00

Added decimation class with unsigned to signed conversion with shift. Applied to RTL-SDR

This commit is contained in:
f4exb
2018-01-16 00:01:38 +01:00
parent 18fa3b6156
commit c7e1526930
4 changed files with 1329 additions and 8 deletions
+2 -5
View File
@@ -88,7 +88,7 @@ void RTLSDRThread::run()
}
// Decimate according to specified log2 (ex: log2=4 => decim=16)
void RTLSDRThread::callback(const qint8* buf, qint32 len)
void RTLSDRThread::callback(const quint8* buf, qint32 len)
{
SampleVector::iterator it = m_convertBuffer.begin();
@@ -178,9 +178,6 @@ void RTLSDRThread::callback(const qint8* buf, qint32 len)
void RTLSDRThread::callbackHelper(unsigned char* buf, uint32_t len, void* ctx)
{
RTLSDRThread* thread = (RTLSDRThread*)ctx;
for (unsigned int i = 0; i < len; i++) {
buf[i] = buf[i] - 127;
}
thread->callback((qint8 *) buf, len);
thread->callback(buf, len);
}