Itemsize mismatch C++

While trying to connect Signal Source block and a Noise block to an add
block then to a usrp_sink I get an itemsize mismatch error at runtime:

what(): itemsize mismatch: sig_source_c0:0 using 8, add_cc0:0 using 16

Connections:

Signal Source -> [ |
| |
| add | ] -> USRP Sink
| |
Noise Source -> [ |

Types:
Signal Source = Complex
Noise Source = Complex
USRP Sink = Complex

If i change the the code to use add_ff (float) from add_cc (complex) it
complies and runs fine. Not the appropriate solution though.

Code:
usrpsink(gr::uhd::usrp_sink::make(uhd::device_addr_t(device_id),
uhd::stream_args_t(cpu_fmt,otw_fmt))),
noisesource(gr::analog::noise_source_c::make(gr::analog::GR_GAUSSIAN,
noise_amp, 0)),
addnoise(gr::blocks::add_cc::make(2)),
sigsource(gr::analog::sig_source_c::make(samp_rate,
gr::analog::GR_SIN_WAVE, source_freq, source_amp)

topblock->connect(sigsource, 0, addnoise, 0);
topblock->connect(noisesource, 0, addnoise, 1);
topblock->connect(addnoise, 0, usrpsink, 0);

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs