discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio]Can not creating a flow graph


From: JackyYang
Subject: [Discuss-gnuradio]Can not creating a flow graph
Date: Tue, 15 Jan 2008 20:53:29 +0800

Hi:

 

I reading this page http://www.gnu.org/software/gnuradio/doc/exploring-gnuradio.html#software. I am try to run example1 “Dial Tone Output”, but I only listen to some voice. Why I can’t creating a flow graph? Maybe I type wrong command? What is command should we type?

 

I use gnuradio-3.1.1 on the windows(cygwin).

 

Thanks.

 

Example 1. Dial Tone Output

#!/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 ()

 


reply via email to

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