diff options
Diffstat (limited to 'gr-audio/examples/python/noise.py')
-rw-r--r-- | gr-audio/examples/python/noise.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gr-audio/examples/python/noise.py b/gr-audio/examples/python/noise.py index 7c8e29cdde..45f41d78b3 100644 --- a/gr-audio/examples/python/noise.py +++ b/gr-audio/examples/python/noise.py @@ -14,6 +14,7 @@ from gnuradio import digital from gnuradio.eng_arg import eng_float from argparse import ArgumentParser + class my_top_block(gr.top_block): def __init__(self): @@ -21,9 +22,9 @@ class my_top_block(gr.top_block): parser = ArgumentParser() parser.add_argument("-O", "--audio-output", default="", - help="pcm output device name. E.g., hw:0,0 or /dev/dsp") + help="pcm output device name. E.g., hw:0,0 or /dev/dsp") parser.add_argument("-r", "--sample-rate", type=eng_float, default=48000, - help="set sample rate to RATE (48000)") + help="set sample rate to RATE (48000)") args = parser.parse_args() sample_rate = int(args.sample_rate) ampl = 0.1 @@ -33,6 +34,7 @@ class my_top_block(gr.top_block): dst = audio.sink(sample_rate, args.audio_output) self.connect(src, b2f, dst) + if __name__ == '__main__': try: my_top_block().run() |