diff options
author | Dimitri Stolnikov <horiz0n@gmx.net> | 2013-04-26 21:04:30 +0200 |
---|---|---|
committer | Dimitri Stolnikov <horiz0n@gmx.net> | 2013-04-26 21:04:30 +0200 |
commit | e157449a9e048525228975ea9693511ed429e76d (patch) | |
tree | 511d3e3bf5465a5d3b0c666f219e1fb0a3506d64 /lib/hackrf/hackrf_source_c.cc | |
parent | 98a805481e6f5d0f406da93aa9ee11ac55e6e572 (diff) |
hackrf: don't skip first samples when streaming
Diffstat (limited to 'lib/hackrf/hackrf_source_c.cc')
-rw-r--r-- | lib/hackrf/hackrf_source_c.cc | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/hackrf/hackrf_source_c.cc b/lib/hackrf/hackrf_source_c.cc index ff9bfeb..51268c9 100644 --- a/lib/hackrf/hackrf_source_c.cc +++ b/lib/hackrf/hackrf_source_c.cc @@ -44,7 +44,6 @@ using namespace boost::assign; #define BUF_LEN (16 * 32 * 512) /* must be multiple of 512 */ #define BUF_NUM 32 -#define BUF_SKIP 1 // buffers to skip due to initial garbage #define BYTES_PER_SAMPLE 2 // HackRF device delivers 8 bit unsigned IQ data @@ -85,8 +84,7 @@ hackrf_source_c::hackrf_source_c (const std::string &args) _auto_gain(false), _amp_gain(0), _lna_gain(0), - _vga_gain(0), - _skipped(0) + _vga_gain(0) { int ret; uint16_t val; @@ -227,11 +225,6 @@ int hackrf_source_c::_hackrf_rx_callback(hackrf_transfer *transfer) int hackrf_source_c::hackrf_rx_callback(unsigned char *buf, uint32_t len) { - if (_skipped < BUF_SKIP) { - _skipped++; - return 0; - } - { boost::mutex::scoped_lock lock( _buf_mutex ); |