discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Rewiring the flowgraph


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] Rewiring the flowgraph
Date: Tue, 13 Jun 2006 06:44:07 -0700
User-agent: Mutt/1.5.9i

On Tue, Jun 13, 2006 at 02:29:49PM +0200, Patrick Strasser wrote:
> Hello!
> 
> I tried to rewire a flwograph, but with no success:
> 
> from gnuradio import gr, audio
> fg =gr.flow_graph()
> src = gr.sig_source_f(48000, gr.GR_SIN_WAVE, 440, 1)
> sink = audio.sink(48000)
> fg.connect(src, sink)
> fg.start()
> fg.stop()
> fg.disconnect(src, sink)
> fg.connect(src, sink)
> fg.start()
> Traceback (most recent call last):
>   File "<input>", line 1, in ?
>   File 
> "/usr/local/lib/python2.3/site-packages/gnuradio/gr/flow_graph.py", line 
> 88, in start
>     self._setup_connections ()
>   File 
> "/usr/local/lib/python2.3/site-packages/gnuradio/gr/flow_graph.py", line 
> 117, in _setup_connections
>     self.validate ()
>   File 
> "/usr/local/lib/python2.3/site-packages/gnuradio/gr/basic_flow_graph.py", 
> line 165, in validate
>     raise ValueError, ("%s::check_topology (%d, %d) failed" % (m, 
> ninputs, noutputs))
> ValueError: <gr_block audio_alsa_sink (1)>::check_topology (1, 0) failed
> 
> Is it possible to do something like this? I guess fg.disconnect is meant 
> to enable some new connections to another block, but I've has no success 
> until now.

It should work.  I think this may be a problem in the ALSA sink
implementation.  There are a couple of FIXME's in there ;)

> I'd like to change the flowgraph to enable or disable different 
> branches, say FM or AM decoding, on the fly. Another use would be to 
> record some signal and in parallel listen to what you record. Instead of 
> muting the sound, disconnect it and listen to your favourite music instead.

It should be possible.  Let me know how it goes.

> Patrick

Eric




reply via email to

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