discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] File source woes


From: John Bratteli
Subject: [Discuss-gnuradio] File source woes
Date: Thu, 5 Jul 2007 11:13:45 -0700 (PDT)

I'm attempting to write a script, based on
usrp_fft.py, that will read a file of gr_complex and
display it.  It works, except that it plays back much
faster than it was recorded.  For example, I recorded
a five second file and gave it to my script.  It
looked to be correct data, but it finished playback in
less than a second.  Here's the essential code:

self.input = gr.file_source(gr.sizeof_gr_complex,
options.filename, options.loop)

adc_freq = 64e6 #inherent to USRP
decim_rate = float(options.decim) #whatever decimation
rate used in recording

input_rate = adc_freq / decim_rate

self.scope = fftsink.fft_sink_c(self, panel,
fft_size=1024, sample_rate=input_rate)

self.connect(self.input, self.scope)

self._build_gui(vbox)

*********************************************

Any help would be greatly appreciated.

John Bratteli


 
____________________________________________________________________________________
TV dinner still cooling? 
Check out "Tonight's Picks" on Yahoo! TV.
http://tv.yahoo.com/




reply via email to

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