aboutsummaryrefslogtreecommitdiffstats
path: root/host/examples/rx_timed_samples.cpp
diff options
context:
space:
mode:
authorPhilip Balister <philip@opensdr.com>2010-07-14 22:16:52 +0000
committerPhilip Balister <philip@opensdr.com>2010-07-14 22:16:52 +0000
commitd9b7d9f2f9c6ebe27b6cfd4085f4a5c524363a1f (patch)
tree2fb2de93a9d908082317226d901c4485b04b1557 /host/examples/rx_timed_samples.cpp
parent87428bf6e1c5fcf623595063921277f9827a919a (diff)
downloaduhd-d9b7d9f2f9c6ebe27b6cfd4085f4a5c524363a1f.tar.gz
uhd-d9b7d9f2f9c6ebe27b6cfd4085f4a5c524363a1f.tar.bz2
uhd-d9b7d9f2f9c6ebe27b6cfd4085f4a5c524363a1f.zip
Convert basic test programs to use shorts in the GPP to avoid using
short to float code in uhd.
Diffstat (limited to 'host/examples/rx_timed_samples.cpp')
-rw-r--r--host/examples/rx_timed_samples.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/host/examples/rx_timed_samples.cpp b/host/examples/rx_timed_samples.cpp
index 3b9acbb2c..a72e1ec81 100644
--- a/host/examples/rx_timed_samples.cpp
+++ b/host/examples/rx_timed_samples.cpp
@@ -84,12 +84,12 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
//loop until total number of samples reached
size_t num_acc_samps = 0; //number of accumulated samples
+ uhd::rx_metadata_t md;
+ std::vector<std::complex<short> > buff(dev->get_max_recv_samps_per_packet());
while(num_acc_samps < total_num_samps){
- uhd::rx_metadata_t md;
- std::vector<std::complex<float> > buff(dev->get_max_recv_samps_per_packet());
size_t num_rx_samps = dev->recv(
&buff.front(), buff.size(), md,
- uhd::io_type_t::COMPLEX_FLOAT32,
+ uhd::io_type_t::COMPLEX_INT16,
uhd::device::RECV_MODE_ONE_PACKET
);