diff options
author | Manoj Gudi | 2013-10-07 20:19:55 +0530 |
---|---|---|
committer | Manoj Gudi | 2013-10-07 20:20:35 +0530 |
commit | 1826d0763c8595997f5f4af1fdb0354e9c0998ad (patch) | |
tree | acbd852cd5a1bf17241b1038b5e37a0e72e64612 /docs/exploring-gnuradio/dial_tone_example.xml | |
parent | 452defdb4a78e9e826740ddf4b9673e926c568a4 (diff) | |
parent | 24b640997ba7fee0c725e65f401f5cbebdab8d08 (diff) | |
download | gnuradio-1826d0763c8595997f5f4af1fdb0354e9c0998ad.tar.gz gnuradio-1826d0763c8595997f5f4af1fdb0354e9c0998ad.tar.bz2 gnuradio-1826d0763c8595997f5f4af1fdb0354e9c0998ad.zip |
README change
Diffstat (limited to 'docs/exploring-gnuradio/dial_tone_example.xml')
-rw-r--r-- | docs/exploring-gnuradio/dial_tone_example.xml | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/docs/exploring-gnuradio/dial_tone_example.xml b/docs/exploring-gnuradio/dial_tone_example.xml new file mode 100644 index 000000000..14ea68039 --- /dev/null +++ b/docs/exploring-gnuradio/dial_tone_example.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<example id="dial_tone_ex"><title>Dial Tone Output</title> +<programlisting> +#!/usr/bin/env python + +from gnuradio import gr +from gnuradio import audio + +def build_graph (): + sampling_freq = 48000 + ampl = 0.1 + + fg = gr.flow_graph () + src0 = gr.sig_source_f (sampling_freq, gr.GR_SIN_WAVE, 350, ampl) + src1 = gr.sig_source_f (sampling_freq, gr.GR_SIN_WAVE, 440, ampl) + dst = audio.sink (sampling_freq) + fg.connect ((src0, 0), (dst, 0)) + fg.connect ((src1, 0), (dst, 1)) + + return fg + +if __name__ == '__main__': + fg = build_graph () + fg.start () + raw_input ('Press Enter to quit: ') + fg.stop () +</programlisting> +</example> |