summaryrefslogtreecommitdiff
path: root/gr-audio/examples/python/dial_tone_daemon.py
diff options
context:
space:
mode:
authorTom Rondeau <trondeau@vt.edu>2012-11-06 14:28:22 -0500
committerTom Rondeau <trondeau@vt.edu>2012-11-06 14:40:43 -0500
commitfd110bdbbe8bc40781c34f33c70deec5b7931109 (patch)
treeef18e813add19b09c57cc21cb672ea602701405b /gr-audio/examples/python/dial_tone_daemon.py
parent0c9c16fb008b02a5af39fb22e18acfff2dbd933a (diff)
analog: Removing reference to gr.sig_source_X and gr.noise_source_X where possible.
Passing make and make test. Examples and apps need testing. gr-filter relies on sig_source and noise_source, so can't remove them from core.
Diffstat (limited to 'gr-audio/examples/python/dial_tone_daemon.py')
-rwxr-xr-xgr-audio/examples/python/dial_tone_daemon.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/gr-audio/examples/python/dial_tone_daemon.py b/gr-audio/examples/python/dial_tone_daemon.py
index b25baebee2..2d40ac9714 100755
--- a/gr-audio/examples/python/dial_tone_daemon.py
+++ b/gr-audio/examples/python/dial_tone_daemon.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2004,2005,2007,2008 Free Software Foundation, Inc.
+# Copyright 2004,2005,2007,2008,2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -22,6 +22,7 @@
from gnuradio import gr, gru
from gnuradio import audio
+from gnuradio import analog
from gnuradio.eng_option import eng_option
from optparse import OptionParser
import os
@@ -36,7 +37,7 @@ class my_top_block(gr.top_block):
help="pcm output device name. E.g., hw:0,0 or /dev/dsp")
parser.add_option("-r", "--sample-rate", type="eng_float", default=48000,
help="set sample rate to RATE (48000)")
- (options, args) = parser.parse_args ()
+ (options, args) = parser.parse_args()
if len(args) != 0:
parser.print_help()
raise SystemExit, 1
@@ -44,12 +45,11 @@ class my_top_block(gr.top_block):
sample_rate = int(options.sample_rate)
ampl = 0.1
- src0 = gr.sig_source_f (sample_rate, gr.GR_SIN_WAVE, 350, ampl)
- src1 = gr.sig_source_f (sample_rate, gr.GR_SIN_WAVE, 440, ampl)
- dst = audio.sink (sample_rate, options.audio_output)
- self.connect (src0, (dst, 0))
- self.connect (src1, (dst, 1))
-
+ 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)
+ dst = audio.sink(sample_rate, options.audio_output)
+ self.connect(src0, (dst, 0))
+ self.connect(src1, (dst, 1))
if __name__ == '__main__':
pid = gru.daemonize()