[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss-gnuradio] Re: Simple example gr-audio-portaudio
From: |
Stephane Fillod |
Subject: |
[Discuss-gnuradio] Re: Simple example gr-audio-portaudio |
Date: |
Mon, 13 Mar 2006 08:56:23 +0100 |
User-agent: |
Mutt/1.5.11 |
On Mon, Mar 13, 2006 at 02:36:24AM -0500, Robert McGwier wrote:
> Stephane:
>
> Can you give a modification of audio_copy.py and audio_play.py that use
> jack and portaudio? I do not seem to get the required syntax.
Here we go. Cc'd to the list since this is going to be a FAQ :-)
Index: mono_tone.py
===================================================================
RCS file: /sources/gnuradio/gnuradio-examples/python/audio/mono_tone.py,v
retrieving revision 1.4
diff -u -b -B -w -p -r1.4 mono_tone.py
--- mono_tone.py 3 Mar 2006 01:26:52 -0000 1.4
+++ mono_tone.py 13 Mar 2006 07:49:56 -0000
@@ -21,7 +21,7 @@
#
from gnuradio import gr
-from gnuradio import audio
+from gnuradio import audio_portaudio
from gnuradio.eng_option import eng_option
from optparse import OptionParser
@@ -44,7 +44,7 @@ class my_graph(gr.flow_graph):
ampl = 0.1
src0 = gr.sig_source_f (sample_rate, gr.GR_SIN_WAVE, 650, ampl)
- dst = audio.sink (sample_rate, options.audio_output)
+ dst = audio_portaudio.sink (sample_rate, 1, options.audio_output)
self.connect (src0, (dst, 0))
Index: multi_tone.py
===================================================================
RCS file: /sources/gnuradio/gnuradio-examples/python/audio/multi_tone.py,v
retrieving revision 1.3
diff -u -b -B -w -p -r1.3 multi_tone.py
--- multi_tone.py 10 Oct 2005 23:17:52 -0000 1.3
+++ multi_tone.py 13 Mar 2006 07:49:56 -0000
@@ -21,7 +21,7 @@
#
from gnuradio import gr
-from gnuradio import audio
+from gnuradio import audio_portaudio
from gnuradio.eng_option import eng_option
from optparse import OptionParser
@@ -63,7 +63,7 @@ class my_graph(gr.flow_graph):
# progression = (7, 11, 1, 5)
progression = (7, 11, 1, 5, 9)
- dst = audio.sink (sample_rate, options.audio_output)
+ dst = audio_portaudio.sink (sample_rate, 1, options.audio_output)
max_chan = dst.input_signature().max_streams()
if (max_chan == -1) or (max_chan > limit_channels):
--
Stephane
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Discuss-gnuradio] Re: Simple example gr-audio-portaudio,
Stephane Fillod <=