mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-01 21:54:55 -04:00
RTL-SDR: corrected bit shifts for 8 bit samples and corrected RTL-SDR unsigned to signed conversion
This commit is contained in:
@@ -88,7 +88,7 @@ void RTLSDRThread::run()
|
||||
}
|
||||
|
||||
// Decimate according to specified log2 (ex: log2=4 => decim=16)
|
||||
void RTLSDRThread::callback(const quint8* buf, qint32 len)
|
||||
void RTLSDRThread::callback(const qint8* buf, qint32 len)
|
||||
{
|
||||
SampleVector::iterator it = m_convertBuffer.begin();
|
||||
|
||||
@@ -178,6 +178,9 @@ void RTLSDRThread::callback(const quint8* buf, qint32 len)
|
||||
void RTLSDRThread::callbackHelper(unsigned char* buf, uint32_t len, void* ctx)
|
||||
{
|
||||
RTLSDRThread* thread = (RTLSDRThread*)ctx;
|
||||
thread->callback(buf, len);
|
||||
for (unsigned int i = 0; i < len; i++) {
|
||||
buf[i] = buf[i] - 127;
|
||||
}
|
||||
thread->callback((qint8 *) buf, len);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user