diff options
| author | Josh Blum <josh@joshknows.com> | 2011-11-11 11:55:04 -0800 | 
|---|---|---|
| committer | Josh Blum <josh@joshknows.com> | 2011-11-11 11:55:04 -0800 | 
| commit | 74106084ed94668f11777f856e9b42e80b5d6599 (patch) | |
| tree | 8a1fa489d923ecd3295143c46b3f7fd9b7afb249 /host/examples | |
| parent | b0834fff86180d05469ffe1fd91d6c1e483edfa9 (diff) | |
| download | uhd-74106084ed94668f11777f856e9b42e80b5d6599.tar.gz uhd-74106084ed94668f11777f856e9b42e80b5d6599.tar.bz2 uhd-74106084ed94668f11777f856e9b42e80b5d6599.zip | |
uhd: simplification for tx waveforms
Diffstat (limited to 'host/examples')
| -rw-r--r-- | host/examples/tx_waveforms.cpp | 8 | 
1 files changed, 3 insertions, 5 deletions
| diff --git a/host/examples/tx_waveforms.cpp b/host/examples/tx_waveforms.cpp index 181c34d05..2a3d9f8e5 100644 --- a/host/examples/tx_waveforms.cpp +++ b/host/examples/tx_waveforms.cpp @@ -75,9 +75,8 @@ public:          }      } -    inline std::complex<float> operator()(size_t &index) const{ -        index %= wave_table_len; -        return _wave_table[index]; +    inline std::complex<float> operator()(const size_t index) const{ +        return _wave_table[index % wave_table_len];      }  private: @@ -241,8 +240,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){      while(not stop_signal_called){          //fill the buffer with the waveform          for (size_t n = 0; n < buff.size(); n++){ -            buff[n] = wave_table(index); -            index += step; +            buff[n] = wave_table(index += step);          }          //send the entire contents of the buffer | 
