[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] Detecting end of a stream of samples in a block

From: Karthik Vijayraghavan
Subject: [Discuss-gnuradio] Detecting end of a stream of samples in a block
Date: Wed, 14 May 2008 12:44:58 -0700

Hi All,

I am trying to write a block which operates only if the number of
input samples is a multiple of some fixed number "M". In general_work
I have a statement

int k = (int) ninput_items[0]/M //number of samples in input stream
if (k<1) return 0;

When I do "return 0", I am assuming that this is equivalent to waiting
for the input stream to get filled with more samples. Is this a
correct assumption? If it is, then how do I deal when I use a source
where the number of samples is finite and the last few samples aren't
multiples of this number M? Is there some way to detect end of a
stream of samples from within the block, so that I can terminate my
block when I get that condition.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]