On 07/09/2023 20:01, 1920swap...@gmail.com wrote:

Well would you say that's still the case if I can run the example if I just exclude certain parameters? For example if I just give a sample rate, freq, duration it runs fine. It's just that when I pass the gain parameter the error shows up. Furthermore, other examples such as rx_samples_to_udp also run fine, even when I add a gain parameter. The issue comes when I try to modify the udp example to include 2 channels, then it fails with the same error stated above.


Well, if the standard examples work, and yours doesn't, I would say that you need to review your modifications to make sure they're
  "sane".

It's unlikely that UHD has a bug that causes the "set_gain()" method to not work in some cases, and two streams vs a single
  stream isn't a particularly "weird" case.

When stuff like this happens--where you modify an example, the onus is on you to do basic debugging, as you would   with any compiled language like C++ or C.  Put in some debugging print statements before and after the call, for example.   Make sure you're providing adequate-sized buffers, so that sample data isn't over-writing other things in your modified   code.  Remember, C++ has NO run-time bounds checking.   Everything is done at compile time, and if a bound cannot   be checked at compile time, there isn't a runtime there to tell you exactly what you did wrong.  That's true of pretty-much
  ALL C/C++ programs.


_______________________________________________
USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-le...@lists.ettus.com

Reply via email to