On Fri, Apr 4, 2008 at 12:51 AM, Darryl Ross <[EMAIL PROTECTED]> wrote:
> (Apologies is this is a duplicate, I think I sent the first one before my > subscription activated) > > > Hi All, > > I'm having a problem trying to use the flex_demod() method of > gnuradio.pager: > > [EMAIL PROTECTED] bin]# ./alsa_flex.py > > > > > gr_fir_fff: using SSE > > > > > > > > > Traceback (most recent call last): > > File "./alsa_flex.py", line 22, in ? > > tb = top_block(queue) > > File "./alsa_flex.py", line 17, in __init__ > > self.connect(src, dst) > > File > > "/opt/gnuradio/lib/python2.4/site-packages/gnuradio/gr/top_block.py", line > > 70, in connect > > self._connect(points[i-1], points[i]) > > File > > "/opt/gnuradio/lib/python2.4/site-packages/gnuradio/gr/top_block.py", line > > 76, in _connect > > dst_block.basic_block(), dst_port) > > File > > "/opt/gnuradio/lib/python2.4/site-packages/gnuradio/gr/gnuradio_swig_py_runtime.py", > > line 1493, in connect > > return _gnuradio_swig_py_runtime.gr_top_block_sptr_connect(*args) > > ValueError: itemsize mismatch: audio_alsa_source(1):0 using 4, > > flex_demod(2):0 using 8 > > > > Reading through some of the documentation, it looks to me like the > itemsize variable is the size of the samples? yes audio_source is giving you floats flex_demod is looking for gr_complex > > > I'm guessing that I need to process (resample?) the signal from the > sound card before passing it to the flex decoder, but I'm not sure what > that processing would be. I'm very new to signal processing, so don't > know what search terms I should be using. > > Can anyone give me a pointer? I think flex_demod is looking for complex data at baseband > > > My (very simple) program so far is: > > #!/usr/bin/python > > > > from gnuradio import audio, gr, pager > > > > > > sample_rate = 48000 > > audio_device = 'hw:0' > > > > > > class top_block(gr.top_block): > > def __init__(self, queue): > > gr.top_block.__init__(self) > > > > src = audio.source(sample_rate, audio_device) > > dst = pager.flex_demod(queue) > > > > self.connect(src, dst) > > > > > > if __name__ == '__main__': > > queue = gr.msg_queue() > > tb = top_block(queue) > > tb.start() > > while True: > > if not queue.empty_p(): > > msg = queue.delete_head() > > print msg.to_string() > > > > Thanks > -Darryl > > > > > > _______________________________________________ > Discuss-gnuradio mailing list > Discuss-gnuradio@gnu.org > http://lists.gnu.org/mailman/listinfo/discuss-gnuradio > >
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio