[Top][All Lists]

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

[Discuss-gnuradio] Help Needed: ValueError: itemsize mismatch: audio_als

From: Darryl Ross
Subject: [Discuss-gnuradio] Help Needed: ValueError: itemsize mismatch: audio_alsa_source(1):0 using 4, flex_demod(2):0 using 8
Date: Fri, 04 Apr 2008 15:21:34 +1030
User-agent: Thunderbird (X11/20080227)

(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

address@hidden 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)
 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?

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?

My (very simple) program so far is:


from gnuradio import audio, gr, pager

sample_rate = 48000
audio_device = 'hw:0'

class top_block(gr.top_block):
    def __init__(self, queue):

        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)
    while True:
        if not queue.empty_p():
            msg = queue.delete_head()
            print msg.to_string()


Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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