commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r6303 - in gnuradio/branches/developers/jcorgan/t162/g


From: jcorgan
Subject: [Commit-gnuradio] r6303 - in gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python: audio hier
Date: Tue, 4 Sep 2007 16:20:46 -0600 (MDT)

Author: jcorgan
Date: 2007-09-04 16:20:46 -0600 (Tue, 04 Sep 2007)
New Revision: 6303

Removed:
   
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/hier/audio/
Modified:
   
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/audio_copy.py
   
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/audio_fft.py
   
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/audio_play.py
   
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/audio_to_file.py
   
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/dial_tone.py
   
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/mono_tone.py
   
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/multi_tone.py
   
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/noise.py
   
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/spectrum_inversion.py
   
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/test_resampler.py
   
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/hier/Makefile.am
Log:
Converted audio examples to new top block code.

Modified: 
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/audio_copy.py
===================================================================
--- 
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/audio_copy.py
      2007-09-04 22:20:21 UTC (rev 6302)
+++ 
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/audio_copy.py
      2007-09-04 22:20:46 UTC (rev 6303)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2004,2005 Free Software Foundation, Inc.
+# Copyright 2004,2005,2007 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -25,10 +25,10 @@
 from gnuradio.eng_option import eng_option
 from optparse import OptionParser
 
-class my_graph(gr.flow_graph):
+class my_top_block(gr.top_block):
 
     def __init__(self):
-        gr.flow_graph.__init__(self)
+        gr.top_block.__init__(self)
 
         parser = OptionParser(option_class=eng_option)
         parser.add_option("-I", "--audio-input", type="string", default="",
@@ -58,7 +58,7 @@
 
 if __name__ == '__main__':
     try:
-        my_graph().run()
+        my_top_block().run()
     except KeyboardInterrupt:
         pass
     

Modified: 
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/audio_fft.py
===================================================================
--- 
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/audio_fft.py
       2007-09-04 22:20:21 UTC (rev 6302)
+++ 
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/audio_fft.py
       2007-09-04 22:20:46 UTC (rev 6303)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2004,2005 Free Software Foundation, Inc.
+# Copyright 2004,2005,2007 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -23,14 +23,14 @@
 from gnuradio import gr, gru, audio
 from gnuradio import eng_notation
 from gnuradio.eng_option import eng_option
-from gnuradio.wxgui import stdgui, fftsink, waterfallsink, scopesink, form, 
slider
+from gnuradio.wxgui import stdgui2, fftsink2, waterfallsink2, scopesink2, 
form, slider
 from optparse import OptionParser
 import wx
 import sys
 
-class app_flow_graph(stdgui.gui_flow_graph):
+class app_top_block(stdgui2.std_top_block):
     def __init__(self, frame, panel, vbox, argv):
-        stdgui.gui_flow_graph.__init__(self)
+        stdgui2.std_top_block.__init__(self, frame, panel, vbox, argv)
 
         self.frame = frame
         self.panel = panel
@@ -57,11 +57,11 @@
         # build the graph
         if options.waterfall:
             self.scope = \
-              waterfallsink.waterfall_sink_f (self, panel, fft_size=1024, 
sample_rate=sample_rate)
+              waterfallsink2.waterfall_sink_f (panel, fft_size=1024, 
sample_rate=sample_rate)
         elif options.oscilloscope:
-            self.scope = scopesink.scope_sink_f(self, panel, 
sample_rate=sample_rate)
+            self.scope = scopesink2.scope_sink_f(panel, 
sample_rate=sample_rate)
         else:
-            self.scope = fftsink.fft_sink_f (self, panel, fft_size=1024, 
sample_rate=sample_rate, fft_rate=30)
+            self.scope = fftsink2.fft_sink_f (panel, fft_size=1024, 
sample_rate=sample_rate, fft_rate=30)
 
        self.src = audio.source (sample_rate, options.audio_input)
 
@@ -130,7 +130,7 @@
 
         
 def main ():
-    app = stdgui.stdapp(app_flow_graph, "Audio FFT", nstatus=1)
+    app = stdgui2.stdapp(app_top_block, "Audio FFT", nstatus=1)
     app.MainLoop()
 
 if __name__ == '__main__':

Modified: 
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/audio_play.py
===================================================================
--- 
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/audio_play.py
      2007-09-04 22:20:21 UTC (rev 6302)
+++ 
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/audio_play.py
      2007-09-04 22:20:46 UTC (rev 6303)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2004,2005 Free Software Foundation, Inc.
+# Copyright 2004,2005,2007 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -26,10 +26,10 @@
 from optparse import OptionParser
 
 
-class my_graph(gr.flow_graph):
+class my_top_block(gr.top_block):
 
     def __init__(self):
-        gr.flow_graph.__init__(self)
+        gr.top_block.__init__(self)
 
         parser = OptionParser(option_class=eng_option)
         parser.add_option("-F", "--filename", type="string", 
default="audio.dat",
@@ -52,6 +52,6 @@
 
 if __name__ == '__main__':
     try:
-        my_graph().run()
+        my_top_block().run()
     except KeyboardInterrupt:
         pass

Modified: 
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/audio_to_file.py
===================================================================
--- 
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/audio_to_file.py
   2007-09-04 22:20:21 UTC (rev 6302)
+++ 
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/audio_to_file.py
   2007-09-04 22:20:46 UTC (rev 6303)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2004 Free Software Foundation, Inc.
+# Copyright 2004,2007 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -25,10 +25,10 @@
 from gnuradio.eng_option import eng_option
 from optparse import OptionParser
 
-class my_graph(gr.flow_graph):
+class my_top_block(gr.top_block):
 
     def __init__(self):
-        gr.flow_graph.__init__(self)
+        gr.top_block.__init__(self)
 
         usage="%prog: [options] output_filename"
         parser = OptionParser(option_class=eng_option, usage=usage)
@@ -58,6 +58,6 @@
 
 if __name__ == '__main__':
     try:
-        my_graph().run()
+        my_top_block().run()
     except KeyboardInterrupt:
         pass

Modified: 
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/dial_tone.py
===================================================================
--- 
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/dial_tone.py
       2007-09-04 22:20:21 UTC (rev 6302)
+++ 
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/dial_tone.py
       2007-09-04 22:20:46 UTC (rev 6303)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2004,2005 Free Software Foundation, Inc.
+# Copyright 2004,2005,2007 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -25,10 +25,10 @@
 from gnuradio.eng_option import eng_option
 from optparse import OptionParser
 
-class my_graph(gr.flow_graph):
+class my_top_block(gr.top_block):
 
     def __init__(self):
-        gr.flow_graph.__init__(self)
+        gr.top_block.__init__(self)
 
         parser = OptionParser(option_class=eng_option)
         parser.add_option("-O", "--audio-output", type="string", default="",
@@ -52,6 +52,6 @@
 
 if __name__ == '__main__':
     try:
-        my_graph().run()
+        my_top_block().run()
     except KeyboardInterrupt:
         pass

Modified: 
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/mono_tone.py
===================================================================
--- 
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/mono_tone.py
       2007-09-04 22:20:21 UTC (rev 6302)
+++ 
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/mono_tone.py
       2007-09-04 22:20:46 UTC (rev 6303)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2004,2005 Free Software Foundation, Inc.
+# Copyright 2004,2005,2007 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -29,10 +29,10 @@
 #print os.getpid()
 #raw_input('Attach gdb and press Enter: ')
 
-class my_graph(gr.flow_graph):
+class my_top_block(gr.top_block):
 
     def __init__(self):
-        gr.flow_graph.__init__(self)
+        gr.top_block.__init__(self)
 
         parser = OptionParser(option_class=eng_option)
         parser.add_option("-O", "--audio-output", type="string", default="",
@@ -61,6 +61,6 @@
 
 if __name__ == '__main__':
     try:
-        my_graph().run()
+        my_top_block().run()
     except KeyboardInterrupt:
         pass

Modified: 
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/multi_tone.py
===================================================================
--- 
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/multi_tone.py
      2007-09-04 22:20:21 UTC (rev 6302)
+++ 
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/multi_tone.py
      2007-09-04 22:20:46 UTC (rev 6303)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2004,2006 Free Software Foundation, Inc.
+# Copyright 2004,2006,2007 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -29,10 +29,10 @@
 #print os.getpid()
 #raw_input('Attach gdb and press Enter: ')
 
-class my_graph(gr.flow_graph):
+class my_top_block(gr.top_block):
 
     def __init__(self):
-        gr.flow_graph.__init__(self)
+        gr.top_block.__init__(self)
 
         parser = OptionParser(option_class=eng_option)
         parser.add_option("-O", "--audio-output", type="string", default="",
@@ -85,6 +85,6 @@
 
 if __name__ == '__main__':
     try:
-        my_graph().run()
+        my_top_block().run()
     except KeyboardInterrupt:
         pass

Modified: 
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/noise.py
===================================================================
--- 
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/noise.py
   2007-09-04 22:20:21 UTC (rev 6302)
+++ 
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/noise.py
   2007-09-04 22:20:46 UTC (rev 6303)
@@ -25,10 +25,10 @@
 from gnuradio.eng_option import eng_option
 from optparse import OptionParser
 
-class my_graph(gr.flow_graph):
+class my_top_block(gr.top_block):
 
     def __init__(self):
-        gr.flow_graph.__init__(self)
+        gr.top_block.__init__(self)
 
         parser = OptionParser(option_class=eng_option)
         parser.add_option("-O", "--audio-output", type="string", default="",
@@ -50,6 +50,6 @@
 
 if __name__ == '__main__':
     try:
-        my_graph().run()
+        my_top_block().run()
     except KeyboardInterrupt:
         pass

Modified: 
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/spectrum_inversion.py
===================================================================
--- 
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/spectrum_inversion.py
      2007-09-04 22:20:21 UTC (rev 6302)
+++ 
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/spectrum_inversion.py
      2007-09-04 22:20:46 UTC (rev 6303)
@@ -1,5 +1,25 @@
 #!/usr/bin/env python
 #
+# Copyright 2004,2005,2007 Free Software Foundation, Inc.
+# 
+# This file is part of GNU Radio
+# 
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+# 
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+
+#
 # Gang - Here's a simple script that demonstrates spectrum inversion
 # using the multiply by [1,-1] method (mixing with Nyquist frequency).
 # Requires nothing but a sound card, and sounds just like listening
@@ -11,10 +31,10 @@
 from gnuradio.eng_option import eng_option
 from optparse import OptionParser
 
-class my_graph(gr.flow_graph):
+class my_top_block(gr.top_block):
 
     def __init__(self):
-        gr.flow_graph.__init__(self)
+        gr.top_block.__init__(self)
 
         parser = OptionParser(option_class=eng_option)
         parser.add_option("-I", "--audio-input", type="string", default="",
@@ -43,6 +63,6 @@
 
 if __name__ == '__main__':
     try:
-        my_graph().run()
+        my_top_block().run()
     except KeyboardInterrupt:
         pass

Modified: 
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/test_resampler.py
===================================================================
--- 
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/test_resampler.py
  2007-09-04 22:20:21 UTC (rev 6302)
+++ 
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/audio/test_resampler.py
  2007-09-04 22:20:46 UTC (rev 6303)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2004,2005 Free Software Foundation, Inc.
+# Copyright 2004,2005,2007 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -20,16 +20,16 @@
 # Boston, MA 02110-1301, USA.
 # 
 
-from gnuradio import gr, gru, blks
+from gnuradio import gr, gru, blks2
 from gnuradio import audio
 from gnuradio.eng_option import eng_option
 from optparse import OptionParser
 
 
-class my_graph(gr.flow_graph):
+class my_top_block(gr.top_block):
 
     def __init__(self):
-        gr.flow_graph.__init__(self)
+        gr.top_block.__init__(self)
 
         parser = OptionParser(option_class=eng_option)
         parser.add_option("-O", "--audio-output", type="string", default="",
@@ -54,13 +54,13 @@
 
         ampl = 0.1
         src0 = gr.sig_source_f (input_rate, gr.GR_SIN_WAVE, 650, ampl)
-        rr = blks.rational_resampler_fff(self, interp, decim)
+        rr = blks2.rational_resampler_fff(interp, decim)
         dst = audio.sink (output_rate, options.audio_output)
         self.connect (src0, rr, (dst, 0))
 
 
 if __name__ == '__main__':
     try:
-        my_graph().run()
+        my_top_block().run()
     except KeyboardInterrupt:
         pass

Modified: 
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/hier/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/hier/Makefile.am
 2007-09-04 22:20:21 UTC (rev 6302)
+++ 
gnuradio/branches/developers/jcorgan/t162/gnuradio-examples/python/hier/Makefile.am
 2007-09-04 22:20:46 UTC (rev 6303)
@@ -20,7 +20,6 @@
 # 
 
 SUBDIRS = \
-    audio \
     dect \
     digital \
     ofdm \





reply via email to

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