smpl_buf: Remove unused clk_rt variable
During 87b7d098e5
we dropped support for
UHD specific functionalitites, and so clk_rt is not needed anymore.
Change-Id: I37403e085ed6a541bbdecf64f1f9a821ff2753a4
This commit is contained in:
parent
7214fde085
commit
580c48b7d5
|
@ -25,9 +25,9 @@
|
|||
#include "smpl_buf.h"
|
||||
#include <inttypes.h>
|
||||
|
||||
smpl_buf::smpl_buf(size_t len, double rate)
|
||||
: buf_len(len), clk_rt(rate),
|
||||
time_start(0), time_end(0), data_start(0), data_end(0)
|
||||
smpl_buf::smpl_buf(size_t len)
|
||||
: buf_len(len), time_start(0), time_end(0),
|
||||
data_start(0), data_end(0)
|
||||
{
|
||||
data = new uint32_t[len];
|
||||
}
|
||||
|
@ -100,12 +100,12 @@ ssize_t smpl_buf::write(void *buf, size_t len, TIMESTAMP timestamp)
|
|||
|
||||
if (timestamp < time_end) {
|
||||
LOGC(DDEV, ERR) << "Overwriting old buffer data: timestamp="<<timestamp<<" time_end="<<time_end;
|
||||
LOGC(DDEV, DEBUG) << "Requested timestamp = " << timestamp << " rate=" << clk_rt;
|
||||
LOGC(DDEV, DEBUG) << "Requested timestamp = " << timestamp;
|
||||
// Do not return error here, because it's a rounding error and is not fatal
|
||||
}
|
||||
if (timestamp > time_end && time_end != 0) {
|
||||
LOGC(DDEV, ERR) << "Skipping buffer data: timestamp="<<timestamp<<" time_end="<<time_end;
|
||||
LOGC(DDEV, DEBUG) << "Requested timestamp = " << timestamp << " rate=" << clk_rt;
|
||||
LOGC(DDEV, DEBUG) << "Requested timestamp = " << timestamp;
|
||||
// Do not return error here, because it's a rounding error and is not fatal
|
||||
}
|
||||
|
||||
|
|
|
@ -37,10 +37,9 @@ class smpl_buf {
|
|||
public:
|
||||
/** Sample buffer constructor
|
||||
@param len number of 32-bit samples the buffer should hold
|
||||
@param rate sample clockrate
|
||||
@param timestamp
|
||||
*/
|
||||
smpl_buf(size_t len, double rate);
|
||||
smpl_buf(size_t len);
|
||||
~smpl_buf();
|
||||
|
||||
/** Query number of samples available for reading
|
||||
|
|
|
@ -514,7 +514,7 @@ int uhd_device::open(const std::string &args, int ref, bool swap_channels)
|
|||
// Create receive buffer
|
||||
size_t buf_len = SAMPLE_BUF_SZ / sizeof(uint32_t);
|
||||
for (size_t i = 0; i < rx_buffers.size(); i++)
|
||||
rx_buffers[i] = new smpl_buf(buf_len, rx_rate);
|
||||
rx_buffers[i] = new smpl_buf(buf_len);
|
||||
|
||||
// Create vector buffer
|
||||
pkt_bufs = std::vector<std::vector<short> >(chans, std::vector<short>(2 * rx_spp));
|
||||
|
|
Loading…
Reference in New Issue