Sample rate in software is just a number used in some equations to get
meaningful signals. It is *not* the rate that things are going through the
flowgraph. There are 8192 items because 8192 items happens to make a nicely
aligned buffer size.


You're not working on a real-time system or with real-time software, so you
can't expect things like "1 input per second".

On Thu, May 11, 2017 at 6:12 AM, Ali <03do...@gmail.com> wrote:

> Hi to all,
>
> I created my own OOT block. It has 6 inputs and 2 outputs and all are type
> of float. I am using Signal Source block and sending constant signals with
> different amplitudes at each input port.
>
> When I run, the the GRC file and change the one of the inputs, outputs
> changes after some time(~5 seconds). To examine the problem, I am printing
> the following variables on the screen:
>
> noutput_items, input1[1], input1[noutput_items], output1[1],
> output1[noutput_items]
>
> ...
> 8192, 44, 44, 1, 1   >>> Input1 is 44 and outputs are 1
> 8192, 44, 44, 1, 1   >>> Input 1 is still 44
>
> 8192, 44, 26, 1, 1   >>> I changed the input1 to 26. Note that input[1] is
> still 44. input[noutput_items] is 26 but output[noutput_items] is also 1!
>
> 8192, 26, 26, 1, 1   >>> The content of input1 is all 26, but the output
> is still 1!
> 8192, 26, 26, 1, 1   >>> The output is still 1!
> 8192, 26, 26, 2, 2   >>> Now the correct output is found!
> ....
>
> First of all, why the dimension of input and output is 8192(sometimes
> 8191)?
>
> samp_rate defined for Signal Source block is smaller than 8192. I am using
> 1, 100 or 1000. But as you can see noutput_items is 8192. How there can be
> 8192 inputs if the sample rate is for example 10?
>
> My module content is like the following:
>
> ------------------------------------
> int myfunction_impl::*general_work*(...)
> {
> const float *input1 = ..
> ..
>
> for (int i=; i<noutput_items; i++)
> {
> *my_function*(input1[i],...,&output1[i],&output2[i])
> }
>
> consume_each(noutput_items);
> return noutput_items;
> }
> --------------------------------------
>
> In short, I want that one input comes per second(sampling rate 1) and one
> output is out and displayed.
>
> Regards,
> Ali
>
> _______________________________________________
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
>
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to