diff options
Diffstat (limited to 'gr-audio/examples/python')
-rwxr-xr-x | gr-audio/examples/python/audio_to_file.py | 4 | ||||
-rwxr-xr-x | gr-audio/examples/python/dial_tone_wav.py | 6 | ||||
-rwxr-xr-x | gr-audio/examples/python/noise.py | 2 | ||||
-rwxr-xr-x | gr-audio/examples/python/spectrum_inversion.py | 4 | ||||
-rwxr-xr-x | gr-audio/examples/python/test_resampler.py | 3 |
5 files changed, 10 insertions, 9 deletions
diff --git a/gr-audio/examples/python/audio_to_file.py b/gr-audio/examples/python/audio_to_file.py index 201ec90bf1..6a2cbcb12e 100755 --- a/gr-audio/examples/python/audio_to_file.py +++ b/gr-audio/examples/python/audio_to_file.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2004,2007 Free Software Foundation, Inc. +# Copyright 2004,2007,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -53,7 +53,7 @@ class my_top_block(gr.top_block): if options.nsamples is None: self.connect((src, 0), dst) else: - head = gr.head(gr.sizeof_float, int(options.nsamples)) + head = blocks.head(gr.sizeof_float, int(options.nsamples)) self.connect((src, 0), head, dst) diff --git a/gr-audio/examples/python/dial_tone_wav.py b/gr-audio/examples/python/dial_tone_wav.py index 91bf744c95..82f8cf331d 100755 --- a/gr-audio/examples/python/dial_tone_wav.py +++ b/gr-audio/examples/python/dial_tone_wav.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2004,2005,2007,2008,2012 Free Software Foundation, Inc. +# Copyright 2004,2005,2007,2008,2012,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -54,8 +54,8 @@ class my_top_block(gr.top_block): src0 = analog.sig_source_f(sample_rate, analog.GR_SIN_WAVE, 350, ampl) src1 = analog.sig_source_f(sample_rate, analog.GR_SIN_WAVE, 440, ampl) - head0 = gr.head(gr.sizeof_float, int(options.samples)) - head1 = gr.head(gr.sizeof_float, int(options.samples)) + head0 = blocks.head(gr.sizeof_float, int(options.samples)) + head1 = blocks.head(gr.sizeof_float, int(options.samples)) dst = blocks.wavfile_sink(args[0], 2, int(options.sample_rate), 16) self.connect(src0, head0, (dst, 0)) diff --git a/gr-audio/examples/python/noise.py b/gr-audio/examples/python/noise.py index bba9e83eae..b15065cd4e 100755 --- a/gr-audio/examples/python/noise.py +++ b/gr-audio/examples/python/noise.py @@ -44,7 +44,7 @@ class my_top_block(gr.top_block): sample_rate = int(options.sample_rate) ampl = 0.1 - src = gr.glfsr_source_b(32) # Pseudorandom noise source + src = digital.glfsr_source_b(32) # Pseudorandom noise source b2f = digital.chunks_to_symbols_bf([ampl, -ampl], 1) dst = audio.sink(sample_rate, options.audio_output) self.connect(src, b2f, dst) diff --git a/gr-audio/examples/python/spectrum_inversion.py b/gr-audio/examples/python/spectrum_inversion.py index 63d0c8cc8d..a02d6c5821 100755 --- a/gr-audio/examples/python/spectrum_inversion.py +++ b/gr-audio/examples/python/spectrum_inversion.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2004,2005,2007 Free Software Foundation, Inc. +# Copyright 2004,2005,2007,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -54,7 +54,7 @@ class my_top_block(gr.top_block): dst = audio.sink (sample_rate, options.audio_output) vec1 = [1, -1] - vsource = gr.vector_source_f(vec1, True) + vsource = blocks.vector_source_f(vec1, True) multiply = blocks.multiply_ff() self.connect(src, (multiply, 0)) diff --git a/gr-audio/examples/python/test_resampler.py b/gr-audio/examples/python/test_resampler.py index 0f5544cfa9..94d95fecf3 100755 --- a/gr-audio/examples/python/test_resampler.py +++ b/gr-audio/examples/python/test_resampler.py @@ -22,6 +22,7 @@ from gnuradio import gr, gru from gnuradio import audio +from gnuradio import filter from gnuradio.eng_option import eng_option from optparse import OptionParser @@ -65,7 +66,7 @@ class my_top_block(gr.top_block): ampl = 0.1 src0 = analog.sig_source_f(input_rate, analog.GR_SIN_WAVE, 650, ampl) - rr = blocks.rational_resampler_fff(interp, decim) + rr = filter.rational_resampler_fff(interp, decim) dst = audio.sink(output_rate, options.audio_output) self.connect(src0, rr, (dst, 0)) |