Scope hangs

Hello all,

This is probably stupid question, but I ask it anyway:

I have example file from:
http://www.gnuradio.org/trac/browser/gnuradio/trunk/gnuradio-examples/python/audio/audio_fft.py?rev=6466

I run it with -S and it works ok. I can press buttons on scope and
responses.

Now a litle change:
66c66
< self.src = audio.source (sample_rate, options.audio_input)

  self.src = gr.sig_source_f (sample_rate, gr.GR_SIN_WAVE, 650, 

And again I run it with -S to get the scope view. But this time the
scopes user interface is hang. Buttons do not do anything, and even when
trying to close window linux tells me ‘Program not responding’ and I
have to force quit this app. The sin wave is scope runs there just fine.
But user interface is ‘locked’ and cpu usage rises.

GnuRadio 3.1.0 compiled it myself. I also did try 3.0.? that comes with
new ubuntu but same thing.
Computer is Pentium 4. with 1GB of memory. Ubuntu linux.

What I did wrong this time?

Tommi Rouvali wrote:

This is probably stupid question, but I ask it anyway:

Not stupid :slight_smile:

But user interface is ‘locked’ and cpu usage rises.
What’s happening here is that the signal source block is running at
maximum CPU speed and preventing the GUI from updating or reacting to
user events. This doesn’t happen with the audio source block as it is
rate limited to the sample_rate parameter.

You need to insert a gr.throttle(gr.sizeof_float, sample_rate) block to
the flowgraph right after the signal source.


Johnathan C.
Corgan Enterprises LLC
http://corganenterprises.com