On Thu, Apr 3, 2008 at 10:51 PM, Darryl Ross <address@hidden> wrote:
I'm having a problem trying to use the flex_demod() method of
gnuradio.pager:
The FLEX demodulator/decoder is designed to operate on a stream of
complex baseband samples received from the USRP; it was not designed
to work with audio from a sound card.
You could use the output of an FM discriminator (but not the external
audio output) in a scanner or other receiver by building your own
hierarchical block using the low-level blocks in gnuradio.pager. The
flex_sync() block expects a 25000 sample per second stream of [-1.0,
1.0] audio samples. Since most sound cards don't create samples at
this rate, you'll need to use the gr.rational_resampler block to
convert your stream from some other rate (like 32000 or 48000).
class flex_decode_block(gr.hier_block2):
def __init__(self, queue):
gr.hier_block2.__init__(self, "flex_decode_block",
gr.io_signature(1, 1, gr.sizeof_float),
gr.io_signature(0, 0, 0))
resamp = blks2.rational_resampler_fff(sample_rate/1000, 25)
slicer = pager_swig.slicer_fb(5e-6)
sync = pager_swig.flex_sync()
self.connect(self, resamp, slicer, sync)
for i in range(4):
print 'Connecting to %d' % i
self.connect((sync, i), pager_swig.flex_deinterleave(),
pager_swig.flex_parse(queue, 0.0))