Y, yes, if you're producing 512 I+Q, you're actually producing either 1024 items of sizeof(unsigned short) or 512 items of sizeof(unsigned short)*2. I'd like to repeat that you *must* make sure that the number of items you write into your output buffer is ≤ noutput_items! What kind of block are you writing?
Best regards, Marcus On 05/09/2015 05:48 PM, Yile Ku wrote: > Marcus, > > Thanks, Actually the size I set for the blocks output signature is 16 > bits (unsigned short), Should it be 32-bits for a combined I & Q > sample? > Y- > > On Sat, May 9, 2015 at 5:11 AM, Marcus Müller > <[email protected] <mailto:[email protected]>> wrote: > > Hi Y, > >> I set noutput_items to 512 > no, noutput_items is the maximum number you're *allowed* to > produce, it doesn't change anything if you set it to anything. You > just return the number of items you've produced at the end of your > work (or general_work) function. Make sure to not write more items > than noutput_items allows you to do! > > If you're returning 512, this tells the scheduler you've produced > 512 *items* -- I don't know what your block's output signature > looks like, but an item has the size of 2x 16bit, it's right. > > > Best regards, > Marcus > > > On 05/09/2015 06:42 AM, Yile Ku wrote: >> My source modules has 16-bit I & Q samples that are interleaved: >> I,Q,I,Q,I,Q... as signed 16 bit values. I generate 512 pairs at >> a time in my work function (C++). I set noutput_items to 512 >> and copy I and Q out 512 times to the output_items variable in >> the work function. Is this the correct format of data that >> subsequent modules can expect? I use the IShort_to_Complex >> module to convert the samples for subsequent modules. >> >> Thanks, >> Y- >> >> >> _______________________________________________ >> Discuss-gnuradio mailing list >> [email protected] <mailto:[email protected]> >> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio > > > _______________________________________________ > Discuss-gnuradio mailing list > [email protected] <mailto:[email protected]> > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio > >
_______________________________________________ Discuss-gnuradio mailing list [email protected] https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
