ifile fixes

This commit is contained in:
Max 2014-08-03 17:27:16 -04:00
parent 25d86e8193
commit af9a3aaedc
1 changed files with 6 additions and 3 deletions

View File

@ -150,7 +150,10 @@ class p25_rx_block (stdgui2.std_top_block):
self.src.set_gain(gain, name) self.src.set_gain(gain, name)
rates = self.src.get_sample_rates() rates = self.src.get_sample_rates()
print 'supported sample rates %d-%d step %d' % (rates.start(), rates.stop(), rates.step()) try:
print 'supported sample rates %d-%d step %d' % (rates.start(), rates.stop(), rates.step())
except:
pass # ignore
if options.freq_corr: if options.freq_corr:
self.src.set_freq_corr(options.freq_corr) self.src.set_freq_corr(options.freq_corr)
@ -1067,8 +1070,8 @@ class p25_rx_block (stdgui2.std_top_block):
rc = ifile.seek(file_seek*1024, gr.SEEK_SET) rc = ifile.seek(file_seek*1024, gr.SEEK_SET)
assert rc == True assert rc == True
#print "seek: %d, rc = %d" % (file_seek, rc) #print "seek: %d, rc = %d" % (file_seek, rc)
throttle = gr.throttle(gr.sizeof_gr_complex, speed) throttle = blocks.throttle(gr.sizeof_gr_complex, speed)
self.source = gr.multiply_const_cc(gain) self.source = blocks.multiply_const_cc(gain)
self.connect(ifile, throttle, self.source) self.connect(ifile, throttle, self.source)
self.__set_rx_from_audio(speed) self.__set_rx_from_audio(speed)
self._set_titlebar("Playing") self._set_titlebar("Playing")