diff options
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/device_deprecated.ipp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/host/include/uhd/device_deprecated.ipp b/host/include/uhd/device_deprecated.ipp index 8e61c389f..698a8a508 100644 --- a/host/include/uhd/device_deprecated.ipp +++ b/host/include/uhd/device_deprecated.ipp @@ -19,6 +19,8 @@ //it supports the old send/recv functions //this was replaced by the streamer API +#define _lazymin(x, y) (((x) > (y))? (y) : (x)) + /*! * Send modes for the device send routine. */ @@ -88,7 +90,7 @@ size_t send( _tx_streamer = get_tx_stream(args); } const size_t nsamps = (send_mode == SEND_MODE_ONE_PACKET)? - std::min(nsamps_per_buff, get_max_send_samps_per_packet()) : + _lazymin(nsamps_per_buff, get_max_send_samps_per_packet()) : nsamps_per_buff; return _tx_streamer->send(buffs, nsamps, metadata, timeout); } @@ -143,7 +145,7 @@ size_t recv( _rx_streamer = get_rx_stream(args); } const size_t nsamps = (recv_mode == RECV_MODE_ONE_PACKET)? - std::min(nsamps_per_buff, get_max_recv_samps_per_packet()) : + _lazymin(nsamps_per_buff, get_max_recv_samps_per_packet()) : nsamps_per_buff; return _rx_streamer->recv(buffs, nsamps, metadata, timeout); } |