discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] Re: windows version


From: Martin Dvh
Subject: [Discuss-gnuradio] Re: windows version
Date: Thu, 21 Jul 2005 01:02:56 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5b) Gecko/20030823

Matt Ettus wrote:


Martin,

I tried running a simple app with a gr.sig_source and a windows audio sink, but it crashed and ended my python session. Do you have any example programs that work?
You can just use
import audio
dst = audio.sink (sampling_freq)

gnuradio will automatically use windows_audio (because it is the only one 
available)

It might have to do with the windows version you are using (I use windows 2000 
SP4)
Or with the fftw version I am using (I am using fftw with 3dnow enabled, 
because I have an old AMD duron which has no SSE)
The fftw dll is copied into PYTHONDIR\Lib\site-packages\gnuradio\gr
If your processor doesn't understand 3dnow fftw might crash (but shouldn't) if used. But simple examples do not use fftw so I might be searching in the wrong direction here.


This last version I only tested the standard dialtone.py example
(previous versions I built, I used several standard examples where I changed 
all sources and sinks to sig sources or file sources and sinks)


Make sure you have python2.4.1 installed
(preferably in a directory without spaces)
http://www.python.org/ftp/python/2.4.1/python-2.4.1.msi

Make sure you have all python dlls on your path
if you use the windows command prompt:
set PATH=c:\Python24;c:\python24\DLLs;c:\Python24\Lib;%PATH%

if you use the msys command prompt
export PATH=/c/Python24:/c/Python24/DLLS:/c/Python24/Lib:$PATH

if this doesn't help add the following to your path:
set 
PATH=c:\Python24\Lib\site-packages\gnuradio;c:\Python24\Lib\site-packages\gnuradio\gr;%PATH%

make sure you do NOT have cygwin python on your path or any other versions of 
the fftw and cppunit dlls

just start the example from a windows command prompt and you should hear the 
dialtone:
J:\pub\projects\gnuradio\gnuradio-examples-0.3\python\audio>python dial_tone.py
(null)/.gnuradio/prefs/gr_vmcircbuf_default_factory: No such file or directory
Press Enter to quit:


#!/usr/bin/env python
from gnuradio import gr
from gnuradio import audio

def build_graph ():
    sampling_freq = 32000
    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, (dst, 0))
    fg.connect (src1, (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]