summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/Makefile.am7
-rw-r--r--config/grc_gnuradio_examples.m44
-rw-r--r--config/grc_gr_audio.m4112
-rw-r--r--config/grc_gr_audio_alsa.m449
-rw-r--r--config/grc_gr_audio_jack.m447
-rw-r--r--config/grc_gr_audio_oss.m463
-rw-r--r--config/grc_gr_audio_osx.m453
-rw-r--r--config/grc_gr_audio_portaudio.m447
-rw-r--r--config/grc_gr_audio_windows.m456
-rw-r--r--config/grc_gr_usrp.m43
-rw-r--r--config/grc_gr_usrp2.m43
-rw-r--r--configure.ac16
-rw-r--r--gnuradio-core/src/guile/.gitignore1
-rw-r--r--gnuradio-core/src/lib/general/gr_frequency_modulator_fc.cc5
-rw-r--r--gnuradio-core/src/lib/io/gr_histo_sink_f.cc5
-rw-r--r--gnuradio-core/src/lib/io/gr_wavfile_sink.cc5
-rw-r--r--gnuradio-core/src/lib/runtime/gr_buffer.h3
-rw-r--r--gnuradio-core/src/lib/runtime/gr_flowgraph.cc3
-rw-r--r--gnuradio-core/src/python/gnuradio/Makefile.am3
-rw-r--r--gnuradio-core/src/python/gnuradio/audio.py88
-rw-r--r--gnuradio-examples/c++/Makefile.am4
-rw-r--r--gnuradio-examples/c++/audio/.gitignore (renamed from gnuradio-examples/c++/dial_tone/.gitignore)2
-rw-r--r--gnuradio-examples/c++/audio/Makefile.am (renamed from gnuradio-examples/c++/dial_tone/Makefile.am)25
-rw-r--r--gnuradio-examples/c++/audio/dial_tone.cc78
-rw-r--r--gnuradio-examples/c++/dial_tone/README16
-rw-r--r--gr-audio-alsa/.gitignore30
-rw-r--r--gr-audio-alsa/build-stamp0
-rw-r--r--gr-audio-alsa/gnuradio-audio-alsa.pc.in11
-rw-r--r--gr-audio-alsa/src/.gitignore20
-rw-r--r--gr-audio-alsa/src/Makefile.am88
-rw-r--r--gr-audio-alsa/src/audio_alsa.i85
-rw-r--r--gr-audio-alsa/src/audio_alsa.test37
-rwxr-xr-xgr-audio-alsa/src/qa_audio_alsa.py40
-rw-r--r--gr-audio-alsa/src/run_guile_tests.in14
-rw-r--r--gr-audio-alsa/src/run_tests.in10
-rw-r--r--gr-audio-jack/.gitignore30
-rw-r--r--gr-audio-jack/gnuradio-audio-jack.pc.in11
-rw-r--r--gr-audio-jack/src/.gitignore15
-rw-r--r--gr-audio-jack/src/Makefile.am75
-rw-r--r--gr-audio-jack/src/Makefile.swig.gen145
-rw-r--r--gr-audio-jack/src/audio_jack.i85
-rwxr-xr-xgr-audio-jack/src/qa_jack.py40
-rw-r--r--gr-audio-jack/src/run_tests.in10
-rw-r--r--gr-audio-oss/.gitignore30
-rw-r--r--gr-audio-oss/src/.gitignore17
-rw-r--r--gr-audio-oss/src/Makefile.swig.gen145
-rw-r--r--gr-audio-oss/src/audio_oss.i75
-rwxr-xr-xgr-audio-oss/src/qa_oss.py40
-rw-r--r--gr-audio-oss/src/run_tests.in10
-rw-r--r--gr-audio-osx/.gitignore30
-rw-r--r--gr-audio-osx/README_OSX61
-rw-r--r--gr-audio-osx/TODO51
-rw-r--r--gr-audio-osx/src/.gitignore16
-rw-r--r--gr-audio-osx/src/Makefile.am80
-rw-r--r--gr-audio-osx/src/Makefile.swig.gen145
-rw-r--r--gr-audio-osx/src/audio_osx.i100
-rw-r--r--gr-audio-osx/src/circular_buffer.h315
-rwxr-xr-xgr-audio-osx/src/qa_osx.py40
-rw-r--r--gr-audio-osx/src/run_tests.in10
-rwxr-xr-xgr-audio-osx/src/test_audio_loop.py65
-rw-r--r--gr-audio-portaudio/.gitignore32
-rw-r--r--gr-audio-portaudio/README99
-rwxr-xr-xgr-audio-portaudio/autoconfiscate.patch1299
-rw-r--r--gr-audio-portaudio/gnuradio-audio-portaudio.pc.in11
-rw-r--r--gr-audio-portaudio/src/.gitignore20
-rw-r--r--gr-audio-portaudio/src/Makefile.am77
-rw-r--r--gr-audio-portaudio/src/Makefile.swig.gen145
-rw-r--r--gr-audio-portaudio/src/audio_portaudio.i82
-rwxr-xr-xgr-audio-portaudio/src/qa_portaudio.py40
-rw-r--r--gr-audio-portaudio/src/run_tests.in10
-rw-r--r--gr-audio-windows/.gitignore32
-rw-r--r--gr-audio-windows/README66
-rw-r--r--gr-audio-windows/src/.gitignore38
-rw-r--r--gr-audio-windows/src/Makefile.am72
-rw-r--r--gr-audio-windows/src/Makefile.swig.gen145
-rw-r--r--gr-audio-windows/src/audio_windows.i73
-rwxr-xr-xgr-audio-windows/src/qa_audio_windows.py40
-rwxr-xr-xgr-audio-windows/src/run_tests.in10
-rw-r--r--gr-audio/.gitignore3
-rw-r--r--gr-audio/Makefile.am (renamed from gr-audio-oss/Makefile.am)15
-rw-r--r--gr-audio/README11
-rw-r--r--gr-audio/gnuradio-audio.pc.in (renamed from gr-audio-oss/gnuradio-audio-oss.pc.in)6
-rw-r--r--gr-audio/grc/.gitignore2
-rw-r--r--gr-audio/grc/Makefile.am (renamed from gr-audio-jack/Makefile.am)11
-rw-r--r--gr-audio/grc/audio_sink.xml (renamed from grc/blocks/audio_sink.xml)3
-rw-r--r--gr-audio/grc/audio_source.xml (renamed from grc/blocks/audio_source.xml)3
-rw-r--r--gr-audio/include/.gitignore2
-rw-r--r--gr-audio/include/Makefile.am (renamed from gr-audio-osx/Makefile.am)10
-rw-r--r--gr-audio/include/gr_audio_api.h (renamed from gnuradio-examples/c++/dial_tone/dial_tone.h)20
-rw-r--r--gr-audio/include/gr_audio_sink.h (renamed from gnuradio-examples/c++/dial_tone/main.cc)37
-rw-r--r--gr-audio/include/gr_audio_source.h (renamed from gnuradio-examples/c++/dial_tone/dial_tone.cc)43
-rw-r--r--gr-audio/lib/.gitignore2
-rw-r--r--gr-audio/lib/Makefile.am179
-rw-r--r--gr-audio/lib/alsa/audio_alsa_sink.cc (renamed from gr-audio-alsa/src/audio_alsa_sink.cc)19
-rw-r--r--gr-audio/lib/alsa/audio_alsa_sink.h (renamed from gr-audio-alsa/src/audio_alsa_sink.h)29
-rw-r--r--gr-audio/lib/alsa/audio_alsa_source.cc (renamed from gr-audio-alsa/src/audio_alsa_source.cc)18
-rw-r--r--gr-audio/lib/alsa/audio_alsa_source.h (renamed from gr-audio-alsa/src/audio_alsa_source.h)26
-rw-r--r--gr-audio/lib/alsa/gr-audio-alsa.conf (renamed from gr-audio-alsa/gr-audio-alsa.conf)0
-rw-r--r--gr-audio/lib/alsa/gri_alsa.cc (renamed from gr-audio-alsa/src/gri_alsa.cc)0
-rw-r--r--gr-audio/lib/alsa/gri_alsa.h (renamed from gr-audio-alsa/src/gri_alsa.h)0
-rw-r--r--gr-audio/lib/gr-audio.conf7
-rw-r--r--gr-audio/lib/gr_audio_registry.cc153
-rw-r--r--gr-audio/lib/gr_audio_registry.h55
-rw-r--r--gr-audio/lib/jack/audio_jack_sink.cc (renamed from gr-audio-jack/src/audio_jack_sink.cc)18
-rw-r--r--gr-audio/lib/jack/audio_jack_sink.h (renamed from gr-audio-jack/src/audio_jack_sink.h)26
-rw-r--r--gr-audio/lib/jack/audio_jack_source.cc (renamed from gr-audio-jack/src/audio_jack_source.cc)15
-rw-r--r--gr-audio/lib/jack/audio_jack_source.h (renamed from gr-audio-jack/src/audio_jack_source.h)26
-rw-r--r--gr-audio/lib/jack/gr-audio-jack.conf (renamed from gr-audio-jack/gr-audio-jack.conf)0
-rw-r--r--gr-audio/lib/jack/gri_jack.cc (renamed from gr-audio-jack/src/gri_jack.cc)0
-rw-r--r--gr-audio/lib/jack/gri_jack.h (renamed from gr-audio-jack/src/gri_jack.h)0
-rw-r--r--gr-audio/lib/oss/audio_oss_sink.cc (renamed from gr-audio-oss/src/audio_oss_sink.cc)16
-rw-r--r--gr-audio/lib/oss/audio_oss_sink.h (renamed from gr-audio-oss/src/audio_oss_sink.h)20
-rw-r--r--gr-audio/lib/oss/audio_oss_source.cc (renamed from gr-audio-oss/src/audio_oss_source.cc)17
-rw-r--r--gr-audio/lib/oss/audio_oss_source.h (renamed from gr-audio-oss/src/audio_oss_source.h)20
-rw-r--r--gr-audio/lib/oss/gr-audio-oss.conf (renamed from gr-audio-oss/gr-audio-oss.conf)0
-rw-r--r--gr-audio/lib/osx/audio_osx.h (renamed from gr-audio-osx/src/audio_osx.h)0
-rw-r--r--gr-audio/lib/osx/audio_osx_sink.cc (renamed from gr-audio-osx/src/audio_osx_sink.cc)25
-rw-r--r--gr-audio/lib/osx/audio_osx_sink.h (renamed from gr-audio-osx/src/audio_osx_sink.h)25
-rw-r--r--gr-audio/lib/osx/audio_osx_source.cc (renamed from gr-audio-osx/src/audio_osx_source.cc)25
-rw-r--r--gr-audio/lib/osx/audio_osx_source.h (renamed from gr-audio-osx/src/audio_osx_source.h)23
-rw-r--r--gr-audio/lib/portaudio/audio_portaudio_sink.cc (renamed from gr-audio-portaudio/src/audio_portaudio_sink.cc)18
-rw-r--r--gr-audio/lib/portaudio/audio_portaudio_sink.h (renamed from gr-audio-portaudio/src/audio_portaudio_sink.h)28
-rw-r--r--gr-audio/lib/portaudio/audio_portaudio_source.cc (renamed from gr-audio-portaudio/src/audio_portaudio_source.cc)18
-rw-r--r--gr-audio/lib/portaudio/audio_portaudio_source.h (renamed from gr-audio-portaudio/src/audio_portaudio_source.h)28
-rw-r--r--gr-audio/lib/portaudio/gr-audio-portaudio.conf (renamed from gr-audio-portaudio/gr-audio-portaudio.conf)0
-rw-r--r--gr-audio/lib/portaudio/gri_portaudio.cc (renamed from gr-audio-portaudio/src/gri_portaudio.cc)0
-rw-r--r--gr-audio/lib/portaudio/gri_portaudio.h (renamed from gr-audio-portaudio/src/gri_portaudio.h)0
-rw-r--r--gr-audio/lib/windows/audio_windows_sink.cc (renamed from gr-audio-windows/src/audio_windows_sink.cc)18
-rw-r--r--gr-audio/lib/windows/audio_windows_sink.h (renamed from gr-audio-windows/src/audio_windows_sink.h)19
-rw-r--r--gr-audio/lib/windows/audio_windows_source.cc (renamed from gr-audio-windows/src/audio_windows_source.cc)17
-rw-r--r--gr-audio/lib/windows/audio_windows_source.h (renamed from gr-audio-windows/src/audio_windows_source.h)20
-rw-r--r--gr-audio/swig/.gitignore5
-rw-r--r--gr-audio/swig/Makefile.am (renamed from gr-audio-oss/src/Makefile.am)63
-rw-r--r--gr-audio/swig/Makefile.swig.gen (renamed from gr-audio-alsa/src/Makefile.swig.gen)100
-rw-r--r--gr-audio/swig/__init__.py (renamed from gr-audio-windows/Makefile.am)8
-rw-r--r--gr-audio/swig/audio_swig.i63
-rw-r--r--gr-qtgui/src/lib/qtgui.h17
-rw-r--r--gr-qtgui/src/lib/qtgui_sink_c.cc13
-rw-r--r--gr-qtgui/src/lib/qtgui_sink_c.h4
-rw-r--r--gr-qtgui/src/lib/qtgui_sink_f.cc13
-rw-r--r--gr-qtgui/src/lib/qtgui_sink_f.h4
-rw-r--r--gr-uhd/swig/uhd_swig.i2
-rw-r--r--gr-usrp/Makefile.am6
-rw-r--r--gr-usrp/grc/.gitignore2
-rw-r--r--gr-usrp/grc/Makefile.am (renamed from gr-audio-portaudio/Makefile.am)24
-rw-r--r--gr-usrp/grc/__init__.py (renamed from grc/grc_gnuradio/usrp/__init__.py)0
-rw-r--r--gr-usrp/grc/common.py (renamed from grc/grc_gnuradio/usrp/common.py)0
-rw-r--r--gr-usrp/grc/dual_usrp.py (renamed from grc/grc_gnuradio/usrp/dual_usrp.py)0
-rw-r--r--gr-usrp/grc/gnuradio-usrp_probe.desktop (renamed from grc/freedesktop/gnuradio-usrp_probe.desktop)0
-rw-r--r--gr-usrp/grc/simple_usrp.py (renamed from grc/grc_gnuradio/usrp/simple_usrp.py)0
-rw-r--r--gr-usrp/grc/usrp_dual_sink_x.xml (renamed from grc/blocks/usrp_dual_sink_x.xml)3
-rw-r--r--gr-usrp/grc/usrp_dual_source_x.xml (renamed from grc/blocks/usrp_dual_source_x.xml)3
-rwxr-xr-xgr-usrp/grc/usrp_probe (renamed from grc/scripts/usrp_probe)0
-rw-r--r--gr-usrp/grc/usrp_probe.xml (renamed from grc/blocks/usrp_probe.xml)0
-rw-r--r--gr-usrp/grc/usrp_simple_sink_x.xml (renamed from grc/blocks/usrp_simple_sink_x.xml)3
-rw-r--r--gr-usrp/grc/usrp_simple_source_x.xml (renamed from grc/blocks/usrp_simple_source_x.xml)3
-rw-r--r--gr-usrp2/Makefile.am6
-rw-r--r--gr-usrp2/grc/.gitignore2
-rw-r--r--gr-usrp2/grc/Makefile.am (renamed from gr-audio-alsa/Makefile.am)15
-rw-r--r--gr-usrp2/grc/gnuradio-usrp2_probe.desktop (renamed from grc/freedesktop/gnuradio-usrp2_probe.desktop)0
-rwxr-xr-xgr-usrp2/grc/usrp2_probe (renamed from grc/scripts/usrp2_probe)0
-rw-r--r--gr-usrp2/grc/usrp2_probe.xml (renamed from grc/blocks/usrp2_probe.xml)0
-rw-r--r--gr-usrp2/grc/usrp2_sink_xxxx.xml (renamed from grc/blocks/usrp2_sink_xxxx.xml)1
-rw-r--r--gr-usrp2/grc/usrp2_source_xxxx.xml (renamed from grc/blocks/usrp2_source_xxxx.xml)1
-rwxr-xr-xgr-utils/src/python/gr_filter_design.py2
-rw-r--r--grc/Makefile.am8
-rw-r--r--grc/blocks/Makefile.am10
-rw-r--r--grc/blocks/block_tree.xml11
-rw-r--r--grc/freedesktop/Makefile.am8
-rw-r--r--grc/freedesktop/grc_setup_freedesktop.in11
-rw-r--r--grc/grc_gnuradio/Makefile.am9
-rw-r--r--grc/gui/ActionHandler.py20
-rw-r--r--grc/gui/MainWindow.py6
-rw-r--r--grc/gui/NotebookPage.py20
-rw-r--r--grc/scripts/Makefile.am4
-rw-r--r--gruel/src/include/gruel/thread.h16
-rw-r--r--gruel/src/lib/Makefile.am1
-rw-r--r--gruel/src/lib/thread.cc35
-rw-r--r--usrp2/host/lib/control.cc6
-rw-r--r--volk/lib/.gitignore1
-rw-r--r--volk/orc/.gitignore2
181 files changed, 1141 insertions, 5431 deletions
diff --git a/config/Makefile.am b/config/Makefile.am
index 68ff3c78c..535844507 100644
--- a/config/Makefile.am
+++ b/config/Makefile.am
@@ -51,12 +51,7 @@ m4macros = \
grc_gnuradio_examples.m4 \
grc_grc.m4 \
grc_gr_atsc.m4 \
- grc_gr_audio_alsa.m4 \
- grc_gr_audio_jack.m4 \
- grc_gr_audio_oss.m4 \
- grc_gr_audio_osx.m4 \
- grc_gr_audio_portaudio.m4 \
- grc_gr_audio_windows.m4 \
+ grc_gr_audio.m4 \
grc_gr_comedi.m4 \
grc_gr_gcell.m4 \
grc_gr_gpio.m4 \
diff --git a/config/grc_gnuradio_examples.m4 b/config/grc_gnuradio_examples.m4
index 0aad0c0da..203f39d0d 100644
--- a/config/grc_gnuradio_examples.m4
+++ b/config/grc_gnuradio_examples.m4
@@ -20,12 +20,14 @@ dnl Boston, MA 02110-1301, USA.
AC_DEFUN([GRC_GNURADIO_EXAMPLES],[
GRC_ENABLE(gnuradio-examples)
- dnl Do not do gnuradio-examples if gnuradio-core skipped
+ dnl Do not do gnuradio-examples if gnuradio-core or gr-audio skipped
GRC_CHECK_DEPENDENCY(gnuradio-examples, gnuradio-core)
+ GRC_CHECK_DEPENDENCY(gnuradio-examples, gr-audio)
AC_CONFIG_FILES([ \
gnuradio-examples/Makefile \
gnuradio-examples/c++/Makefile \
+ gnuradio-examples/c++/audio/Makefile \
gnuradio-examples/python/Makefile \
gnuradio-examples/grc/Makefile \
gnuradio-examples/python/apps/hf_explorer/Makefile \
diff --git a/config/grc_gr_audio.m4 b/config/grc_gr_audio.m4
new file mode 100644
index 000000000..bcb19be35
--- /dev/null
+++ b/config/grc_gr_audio.m4
@@ -0,0 +1,112 @@
+dnl Copyright 2011 Free Software Foundation, Inc.
+dnl
+dnl This file is part of GNU Radio
+dnl
+dnl GNU Radio is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 3, or (at your option)
+dnl any later version.
+dnl
+dnl GNU Radio is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with GNU Radio; see the file COPYING. If not, write to
+dnl the Free Software Foundation, Inc., 51 Franklin Street,
+dnl Boston, MA 02110-1301, USA.
+
+AC_DEFUN([GRC_GR_AUDIO],[
+ GRC_ENABLE(gr-audio)
+
+ GRC_CHECK_DEPENDENCY(gr-audio, gnuradio-core)
+
+ ####################################################################
+ ## ALSA Support
+ ####################################################################
+ PKG_CHECK_MODULES(ALSA, alsa >= 0.9,[GR_AUDIO_ALSA_SUPPORT=true],
+ [GR_AUDIO_ALSA_SUPPORT=false;AC_MSG_RESULT([gr-audio alsa support requires package alsa, not found.])])
+ AM_CONDITIONAL(GR_AUDIO_ALSA_SUPPORT, $GR_AUDIO_ALSA_SUPPORT)
+
+ ####################################################################
+ ## OSS Support
+ ####################################################################
+ dnl Make sure the correct library and/or headers are available.
+ case $host_os in
+ netbsd*)
+ AC_HAVE_LIBRARY(ossaudio,[GR_AUDIO_OSS_SUPPORT=true],
+ [GR_AUDIO_OSS_SUPPORT=false;AC_MSG_RESULT([gr-audio oss support requires library ossaudio, not found.])])
+ if test $GR_AUDIO_OSS_SUPPORT != false; then
+ OSS_LIBS=-lossaudio
+ AC_SUBST(OSS_LIBS)
+ AC_MSG_RESULT([Using OSS library $OSS_LIBS])
+ fi
+ ;;
+ darwin*)
+ dnl OSX / Darwin can't use OSS
+ GR_AUDIO_OSS_SUPPORT=false
+ ;;
+ *)
+ AC_CHECK_HEADER(sys/soundcard.h,[GR_AUDIO_OSS_SUPPORT=true],
+ [GR_AUDIO_OSS_SUPPORT=false;AC_MSG_RESULT([gr-audio oss support requires sys/soundcard.h, not found.])])
+ esac
+ AM_CONDITIONAL(GR_AUDIO_OSS_SUPPORT, $GR_AUDIO_OSS_SUPPORT)
+
+ ####################################################################
+ ## Jack Support
+ ####################################################################
+ PKG_CHECK_MODULES(JACK, jack >= 0.8, [GR_AUDIO_JACK_SUPPORT=true],
+ [GR_AUDIO_JACK_SUPPORT=false;AC_MSG_RESULT([gr-audio jack support requires package jack, not found.])])
+ AM_CONDITIONAL(GR_AUDIO_JACK_SUPPORT, $GR_AUDIO_JACK_SUPPORT)
+
+ ####################################################################
+ ## OSX Support
+ ####################################################################
+ case "$host_os" in
+ darwin*)
+ MACOSX_AUDIOUNIT([GR_AUDIO_OSX_SUPPORT=true],
+ [GR_AUDIO_OSX_SUPPORT=false;AC_MSG_RESULT([gr-audio osx support requires AudioUnit, not found.])])
+ ;;
+ *)
+ AC_MSG_RESULT([gr-audio osx support will build on Mac OS X and Darwin only.])
+ GR_AUDIO_OSX_SUPPORT=false
+ ;;
+ esac
+ AM_CONDITIONAL(GR_AUDIO_OSX_SUPPORT, $GR_AUDIO_OSX_SUPPORT)
+
+ ####################################################################
+ ## PortAudio Support
+ ####################################################################
+ PKG_CHECK_MODULES(PORTAUDIO, portaudio-2.0 >= 19,[GR_AUDIO_PORTAUDIO_SUPPORT=true],
+ [GR_AUDIO_PORTAUDIO_SUPPORT=false;AC_MSG_RESULT([gr-audio portaudio support requires package portaudio, not found.])])
+ AM_CONDITIONAL(GR_AUDIO_PORTAUDIO_SUPPORT, $GR_AUDIO_PORTAUDIO_SUPPORT)
+
+ ####################################################################
+ ## Windows Support
+ ####################################################################
+ case "$host_os" in
+ cygwin*|win*|mingw*)
+ AC_HAVE_LIBRARY(winmm, [GR_AUDIO_WINDOWS_SUPPORT=true],
+ [GR_AUDIO_WINDOWS_SUPPORT=false;AC_MSG_RESULT([gr-audio windows support requires library winmm, not found.])])
+ ;;
+ *)
+ AC_MSG_RESULT([gr-audio windows support will build on a Windows Unix environment only.])
+ GR_AUDIO_WINDOWS_SUPPORT=false
+ ;;
+ esac
+ WINAUDIO_LIBS=-lwinmm
+ AC_SUBST(WINAUDIO_LIBS)
+ AM_CONDITIONAL(GR_AUDIO_WINDOWS_SUPPORT, $GR_AUDIO_WINDOWS_SUPPORT)
+
+ AC_CONFIG_FILES([ \
+ gr-audio/Makefile \
+ gr-audio/grc/Makefile \
+ gr-audio/include/Makefile \
+ gr-audio/lib/Makefile \
+ gr-audio/swig/Makefile \
+ gr-audio/gnuradio-audio.pc \
+ ])
+
+ GRC_BUILD_CONDITIONAL(gr-audio)
+])
diff --git a/config/grc_gr_audio_alsa.m4 b/config/grc_gr_audio_alsa.m4
deleted file mode 100644
index 35389d81d..000000000
--- a/config/grc_gr_audio_alsa.m4
+++ /dev/null
@@ -1,49 +0,0 @@
-dnl Copyright 2001,2002,2003,2004,2005,2006,2008 Free Software Foundation, Inc.
-dnl
-dnl This file is part of GNU Radio
-dnl
-dnl GNU Radio is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 3, or (at your option)
-dnl any later version.
-dnl
-dnl GNU Radio is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with GNU Radio; see the file COPYING. If not, write to
-dnl the Free Software Foundation, Inc., 51 Franklin Street,
-dnl Boston, MA 02110-1301, USA.
-
-AC_DEFUN([GRC_GR_AUDIO_ALSA],[
- GRC_ENABLE(gr-audio-alsa)
-
- dnl Don't do gr-audio-alsa if gnuradio-core skipped
- GRC_CHECK_DEPENDENCY(gr-audio-alsa, gnuradio-core)
-
- dnl If execution gets to here, $passed will be:
- dnl with : if the --with code didn't error out
- dnl yes : if the --enable code passed muster and all dependencies are met
- dnl no : otherwise
- if test $passed = yes; then
- dnl Don't do gr-audio-alsa if the 'alsa' package is not installed.
- PKG_CHECK_MODULES(ALSA, alsa >= 0.9,[],
- [passed=no;AC_MSG_RESULT([gr-audio-alsa requires package alsa, not found.])])
- fi
-
- AC_CONFIG_FILES([ \
- gr-audio-alsa/Makefile \
- gr-audio-alsa/gnuradio-audio-alsa.pc \
- gr-audio-alsa/src/Makefile \
- gr-audio-alsa/src/run_guile_tests \
- gr-audio-alsa/src/run_tests \
- ])
-
- GRC_BUILD_CONDITIONAL(gr-audio-alsa,[
- dnl run_tests is created from run_tests.in. Make it executable.
- AC_CONFIG_COMMANDS([run_tests_alsa],
- [chmod +x gr-audio-alsa/src/run_tests gr-audio-alsa/src/run_guile_tests])
- ])
-])
diff --git a/config/grc_gr_audio_jack.m4 b/config/grc_gr_audio_jack.m4
deleted file mode 100644
index d1853588b..000000000
--- a/config/grc_gr_audio_jack.m4
+++ /dev/null
@@ -1,47 +0,0 @@
-dnl Copyright 2001,2002,2003,2004,2005,2006,2008 Free Software Foundation, Inc.
-dnl
-dnl This file is part of GNU Radio
-dnl
-dnl GNU Radio is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 3, or (at your option)
-dnl any later version.
-dnl
-dnl GNU Radio is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with GNU Radio; see the file COPYING. If not, write to
-dnl the Free Software Foundation, Inc., 51 Franklin Street,
-dnl Boston, MA 02110-1301, USA.
-
-AC_DEFUN([GRC_GR_AUDIO_JACK],[
- GRC_ENABLE(gr-audio-jack)
-
- dnl Don't do gr-audio-jack if gnuradio-core skipped
- GRC_CHECK_DEPENDENCY(gr-audio-jack, gnuradio-core)
-
- dnl If execution gets to here, $passed will be:
- dnl with : if the --with code didn't error out
- dnl yes : if the --enable code passed muster and all dependencies are met
- dnl no : otherwise
- if test $passed = yes; then
- dnl Don't do gr-audio-jack if in 'jack' isn't installed
- PKG_CHECK_MODULES(JACK, jack >= 0.8, [],
- [passed=no;AC_MSG_RESULT([gr-audio-jack requires package jack, not found.])])
- fi
-
- AC_CONFIG_FILES([ \
- gr-audio-jack/Makefile \
- gr-audio-jack/gnuradio-audio-jack.pc \
- gr-audio-jack/src/Makefile \
- gr-audio-jack/src/run_tests \
- ])
-
- GRC_BUILD_CONDITIONAL(gr-audio-jack,[
- dnl run_tests is created from run_tests.in. Make it executable.
- AC_CONFIG_COMMANDS([run_tests_jack], [chmod +x gr-audio-jack/src/run_tests])
- ])
-])
diff --git a/config/grc_gr_audio_oss.m4 b/config/grc_gr_audio_oss.m4
deleted file mode 100644
index 13c83bba9..000000000
--- a/config/grc_gr_audio_oss.m4
+++ /dev/null
@@ -1,63 +0,0 @@
-dnl Copyright 2001,2002,2003,2004,2005,2006,2008 Free Software Foundation, Inc.
-dnl
-dnl This file is part of GNU Radio
-dnl
-dnl GNU Radio is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 3, or (at your option)
-dnl any later version.
-dnl
-dnl GNU Radio is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with GNU Radio; see the file COPYING. If not, write to
-dnl the Free Software Foundation, Inc., 51 Franklin Street,
-dnl Boston, MA 02110-1301, USA.
-
-AC_DEFUN([GRC_GR_AUDIO_OSS],[
- GRC_ENABLE(gr-audio-oss)
-
- dnl Don't do gr-audio-oss if gnuradio-core skipped
- GRC_CHECK_DEPENDENCY(gr-audio-oss, gnuradio-core)
-
- dnl If execution gets to here, $passed will be:
- dnl with : if the --with code didn't error out
- dnl yes : if the --enable code passed muster and all dependencies are met
- dnl no : otherwise
- if test $passed = yes; then
- dnl Make sure the correct library and/or headers are available.
- case $host_os in
- netbsd*)
- AC_HAVE_LIBRARY(ossaudio,[],
- [passed=no;AC_MSG_RESULT([gr-audio-oss requires library ossaudio, not found.])])
- if test $passed != no; then
- OSS_LIBS=-lossaudio
- AC_SUBST(OSS_LIBS)
- AC_MSG_RESULT([Using OSS library $OSS_LIBS])
- fi
- ;;
- darwin*)
- dnl OSX / Darwin can't use OSS
- passed=no
- ;;
- *)
- AC_CHECK_HEADER(sys/soundcard.h,[],
- [passed=no;AC_MSG_RESULT([gr-audio-oss requires sys/soundcard.h, not found.])])
- esac
- fi
-
- AC_CONFIG_FILES([ \
- gr-audio-oss/Makefile \
- gr-audio-oss/gnuradio-audio-oss.pc \
- gr-audio-oss/src/Makefile \
- gr-audio-oss/src/run_tests \
- ])
-
- GRC_BUILD_CONDITIONAL(gr-audio-oss,[
- dnl run_tests is created from run_tests.in. Make it executable.
- AC_CONFIG_COMMANDS([run_tests_oss], [chmod +x gr-audio-oss/src/run_tests])
- ])
-])
diff --git a/config/grc_gr_audio_osx.m4 b/config/grc_gr_audio_osx.m4
deleted file mode 100644
index df8634ff6..000000000
--- a/config/grc_gr_audio_osx.m4
+++ /dev/null
@@ -1,53 +0,0 @@
-dnl Copyright 2001,2002,2003,2004,2005,2006,2008,2010 Free Software Foundation, Inc.
-dnl
-dnl This file is part of GNU Radio
-dnl
-dnl GNU Radio is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 3, or (at your option)
-dnl any later version.
-dnl
-dnl GNU Radio is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with GNU Radio; see the file COPYING. If not, write to
-dnl the Free Software Foundation, Inc., 51 Franklin Street,
-dnl Boston, MA 02110-1301, USA.
-
-AC_DEFUN([GRC_GR_AUDIO_OSX],[
- GRC_ENABLE(gr-audio-osx)
-
- dnl Don't do gr-audio-osx if gnuradio-core skipped
- GRC_CHECK_DEPENDENCY(gr-audio-osx, gnuradio-core)
-
- dnl If execution gets to here, $passed will be:
- dnl with : if the --with code didn't error out
- dnl yes : if the --enable code passed muster and all dependencies are met
- dnl no : otherwise
- if test $passed = yes; then
- case "$host_os" in
- darwin*)
- MACOSX_AUDIOUNIT([],
- [passed=no;AC_MSG_RESULT([gr-audio-osx requires AudioUnit, not found.])])
- ;;
- *)
- AC_MSG_RESULT([gr-audio-osx will build on Mac OS X and Darwin only.])
- passed=no
- ;;
- esac
- fi
-
- AC_CONFIG_FILES([ \
- gr-audio-osx/Makefile \
- gr-audio-osx/src/Makefile \
- gr-audio-osx/src/run_tests \
- ])
-
- GRC_BUILD_CONDITIONAL(gr-audio-osx,[
- dnl run_tests is created from run_tests.in. Make it executable.
- AC_CONFIG_COMMANDS([run_tests_osx], [chmod +x gr-audio-osx/src/run_tests])
- ])
-])
diff --git a/config/grc_gr_audio_portaudio.m4 b/config/grc_gr_audio_portaudio.m4
deleted file mode 100644
index ff551b38a..000000000
--- a/config/grc_gr_audio_portaudio.m4
+++ /dev/null
@@ -1,47 +0,0 @@
-dnl Copyright 2001,2002,2003,2004,2005,2006,2008 Free Software Foundation, Inc.
-dnl
-dnl This file is part of GNU Radio
-dnl
-dnl GNU Radio is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 3, or (at your option)
-dnl any later version.
-dnl
-dnl GNU Radio is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with GNU Radio; see the file COPYING. If not, write to
-dnl the Free Software Foundation, Inc., 51 Franklin Street,
-dnl Boston, MA 02110-1301, USA.
-
-AC_DEFUN([GRC_GR_AUDIO_PORTAUDIO],[
- GRC_ENABLE(gr-audio-portaudio)
-
- dnl Don't do gr-audio-portaudio if gnuradio-core skipped
- GRC_CHECK_DEPENDENCY(gr-audio-portaudio, gnuradio-core)
-
- dnl If execution gets to here, $passed will be:
- dnl with : if the --with code didn't error out
- dnl yes : if the --enable code passed muster and all dependencies are met
- dnl no : otherwise
- if test $passed = yes; then
- dnl Don't do gr-audio-portaudio if the 'portaudio' library is unavailable.
- PKG_CHECK_MODULES(PORTAUDIO, portaudio-2.0 >= 19,[],
- [passed=no;AC_MSG_RESULT([gr-audio-portaudio requires package portaudio, not found.])])
- fi
-
- AC_CONFIG_FILES([ \
- gr-audio-portaudio/Makefile \
- gr-audio-portaudio/gnuradio-audio-portaudio.pc \
- gr-audio-portaudio/src/Makefile \
- gr-audio-portaudio/src/run_tests \
- ])
-
- GRC_BUILD_CONDITIONAL(gr-audio-portaudio,[
- dnl run_tests is created from run_tests.in. Make it executable.
- AC_CONFIG_COMMANDS([run_tests_portaudio], [chmod +x gr-audio-portaudio/src/run_tests])
- ])
-])
diff --git a/config/grc_gr_audio_windows.m4 b/config/grc_gr_audio_windows.m4
deleted file mode 100644
index bb6244163..000000000
--- a/config/grc_gr_audio_windows.m4
+++ /dev/null
@@ -1,56 +0,0 @@
-dnl Copyright 2001,2002,2003,2004,2005,2006,2008 Free Software Foundation, Inc.
-dnl
-dnl This file is part of GNU Radio
-dnl
-dnl GNU Radio is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 3, or (at your option)
-dnl any later version.
-dnl
-dnl GNU Radio is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with GNU Radio; see the file COPYING. If not, write to
-dnl the Free Software Foundation, Inc., 51 Franklin Street,
-dnl Boston, MA 02110-1301, USA.
-
-AC_DEFUN([GRC_GR_AUDIO_WINDOWS],[
- GRC_ENABLE(gr-audio-windows)
-
- dnl Don't do gr-audio-windows if gnuradio-core skipped
- GRC_CHECK_DEPENDENCY(gr-audio-windows, gnuradio-core)
-
- dnl If execution gets to here, $passed will be:
- dnl with : if the --with code didn't error out
- dnl yes : if the --enable code passed muster and all dependencies are met
- dnl no : otherwise
- if test $passed = yes; then
- case "$host_os" in
- cygwin*|win*|mingw*)
- dnl Don't do gr-audio-windows if the 'winmm' library isn't available.
- AC_HAVE_LIBRARY(winmm, [],
- [passed=no;AC_MSG_RESULT([gr-audio-windows requires library winmm, not found.])])
- ;;
- *)
- AC_MSG_RESULT([gr-audio-windows will build on a Windows Unix environment only.])
- passed=no
- ;;
- esac
- fi
-
- AC_CONFIG_FILES([ \
- gr-audio-windows/Makefile \
- gr-audio-windows/src/Makefile \
- gr-audio-windows/src/run_tests \
- ])
-
- GRC_BUILD_CONDITIONAL(gr-audio-windows,[
- WINAUDIO_LIBS=-lwinmm
- AC_SUBST(WINAUDIO_LIBS)
- dnl run_tests is created from run_tests.in. Make it executable.
- AC_CONFIG_COMMANDS([run_tests_audio_windows], [chmod +x gr-audio-windows/src/run_tests])
- ])
-])
diff --git a/config/grc_gr_usrp.m4 b/config/grc_gr_usrp.m4
index b850f0050..c3d2667ca 100644
--- a/config/grc_gr_usrp.m4
+++ b/config/grc_gr_usrp.m4
@@ -1,4 +1,4 @@
-dnl Copyright 2001,2002,2003,2004,2005,2006,2008 Free Software Foundation, Inc.
+dnl Copyright 2001,2002,2003,2004,2005,2006,2008,2011 Free Software Foundation, Inc.
dnl
dnl This file is part of GNU Radio
dnl
@@ -26,6 +26,7 @@ AC_DEFUN([GRC_GR_USRP],[
AC_CONFIG_FILES([ \
gr-usrp/Makefile \
+ gr-usrp/grc/Makefile \
gr-usrp/gnuradio-usrp.pc \
gr-usrp/src/Makefile \
gr-usrp/src/run_tests \
diff --git a/config/grc_gr_usrp2.m4 b/config/grc_gr_usrp2.m4
index 5a9bb3b70..3d64db6d6 100644
--- a/config/grc_gr_usrp2.m4
+++ b/config/grc_gr_usrp2.m4
@@ -1,4 +1,4 @@
-dnl Copyright 2008 Free Software Foundation, Inc.
+dnl Copyright 2008,2011 Free Software Foundation, Inc.
dnl
dnl This file is part of GNU Radio
dnl
@@ -26,6 +26,7 @@ AC_DEFUN([GRC_GR_USRP2],[
AC_CONFIG_FILES([ \
gr-usrp2/Makefile \
+ gr-usrp2/grc/Makefile \
gr-usrp2/gnuradio-usrp2.pc \
gr-usrp2/src/Makefile \
gr-usrp2/src/run_tests \
diff --git a/configure.ac b/configure.ac
index 7546eb302..73ebbd6af 100644
--- a/configure.ac
+++ b/configure.ac
@@ -219,20 +219,11 @@ AC_CHECK_LIB(m, sincos, [AC_DEFINE([HAVE_SINCOS],[1],[Define to 1 if your system
AC_CHECK_LIB(m, sincosf,[AC_DEFINE([HAVE_SINCOSF],[1],[Define to 1 if your system has `sincosf'.])])
AC_CHECK_LIB(m, sinf, [AC_DEFINE([HAVE_SINF],[1],[Define to 1 if your system has `sinf'.])])
AC_CHECK_LIB(m, cosf, [AC_DEFINE([HAVE_COSF],[1],[Define to 1 if your system has `cosf'.])])
-AC_CHECK_LIB(m, trunc, [AC_DEFINE([HAVE_TRUNC],[1],[Define to 1 if your system has `trunc'.])])
AC_CHECK_LIB(m, exp10, [AC_DEFINE([HAVE_EXP10],[1],[Define to 1 if your system has 'exp10'.])])
AC_CHECK_LIB(m, log2, [AC_DEFINE([HAVE_LOG2],[1],[Define to 1 if your system has 'log2'.])])
#AC_FUNC_MKTIME
AH_BOTTOM([
-#ifndef HAVE_TRUNC
-#include <math.h>
-inline static double trunc(double x)
-{
- return x >= 0 ? floor(x) : ceil(x);
-}
-#endif
-
#ifndef HAVE_EXP10
#include <math.h>
inline static double exp10(double x)
@@ -367,12 +358,7 @@ GRC_GR_USRP dnl this must come after GRC_USRP
GRC_GR_USRP2
GRC_GR_GCELL dnl this must come after GRC_GCELL and GRC_GNURADIO_CORE
GRC_GR_MSDD6000
-GRC_GR_AUDIO_ALSA
-GRC_GR_AUDIO_JACK
-GRC_GR_AUDIO_OSS
-GRC_GR_AUDIO_OSX
-GRC_GR_AUDIO_PORTAUDIO
-GRC_GR_AUDIO_WINDOWS
+GRC_GR_AUDIO
GRC_GR_ATSC
GRC_GR_COMEDI
GRC_GR_CVSD_VOCODER
diff --git a/gnuradio-core/src/guile/.gitignore b/gnuradio-core/src/guile/.gitignore
index 82a29a907..ea2593923 100644
--- a/gnuradio-core/src/guile/.gitignore
+++ b/gnuradio-core/src/guile/.gitignore
@@ -2,3 +2,4 @@
/Makefile.in
/run_guile_tests
/guile.log
+/gr-run-waveform-script
diff --git a/gnuradio-core/src/lib/general/gr_frequency_modulator_fc.cc b/gnuradio-core/src/lib/general/gr_frequency_modulator_fc.cc
index 0f6f0d719..bff22be25 100644
--- a/gnuradio-core/src/lib/general/gr_frequency_modulator_fc.cc
+++ b/gnuradio-core/src/lib/general/gr_frequency_modulator_fc.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004,2010 Free Software Foundation, Inc.
+ * Copyright 2004,2010,2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -28,6 +28,7 @@
#include <gr_io_signature.h>
#include <gr_sincos.h>
#include <math.h>
+#include <boost/math/special_functions/trunc.hpp>
gr_frequency_modulator_fc_sptr gr_make_frequency_modulator_fc (double sensitivity)
@@ -62,7 +63,7 @@ gr_frequency_modulator_fc::work (int noutput_items,
// to avoid loss of precision in the addition above.
if (fabs (d_phase) > 16 * M_PI){
- double ii = trunc (d_phase / (2 * M_PI));
+ double ii = boost::math::trunc (d_phase / (2 * M_PI));
d_phase = d_phase - (ii * 2 * M_PI);
}
diff --git a/gnuradio-core/src/lib/io/gr_histo_sink_f.cc b/gnuradio-core/src/lib/io/gr_histo_sink_f.cc
index a37189c24..fc0c12ce6 100644
--- a/gnuradio-core/src/lib/io/gr_histo_sink_f.cc
+++ b/gnuradio-core/src/lib/io/gr_histo_sink_f.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2009,2010 Free Software Foundation, Inc.
+ * Copyright 2009,2010,2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -26,6 +26,7 @@
#include <gr_histo_sink_f.h>
#include <gr_io_signature.h>
+#include <boost/math/special_functions/round.hpp>
static float get_clean_num(float num){
if (num == 0) return 0;
@@ -101,7 +102,7 @@ gr_histo_sink_f::send_frame(void){
int index;
float bin_width = (maximum - minimum)/(d_num_bins-1);
for (unsigned int i = 0; i < d_sample_count; i++){
- index = round((d_samps[i] - minimum)/bin_width);
+ index = boost::math::iround((d_samps[i] - minimum)/bin_width);
/* ensure the index range in case a small floating point error is involed */
if (index < 0) index = 0;
if (index >= (int)d_num_bins) index = d_num_bins-1;
diff --git a/gnuradio-core/src/lib/io/gr_wavfile_sink.cc b/gnuradio-core/src/lib/io/gr_wavfile_sink.cc
index b60a6e3ab..a96aadc72 100644
--- a/gnuradio-core/src/lib/io/gr_wavfile_sink.cc
+++ b/gnuradio-core/src/lib/io/gr_wavfile_sink.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
+ * Copyright 2004,2006,2007,2008,2009,2010,2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -33,6 +33,7 @@
#include <cmath>
#include <fcntl.h>
#include <gruel/thread.h>
+#include <boost/math/special_functions/round.hpp>
// win32 (mingw/msvc) specific
#ifdef HAVE_IO_H
@@ -224,7 +225,7 @@ gr_wavfile_sink::convert_to_short(float sample)
sample = d_min_sample_val;
}
- return (short int) roundf(sample);
+ return (short int) boost::math::iround(sample);
}
diff --git a/gnuradio-core/src/lib/runtime/gr_buffer.h b/gnuradio-core/src/lib/runtime/gr_buffer.h
index aa26f1e09..e5725d386 100644
--- a/gnuradio-core/src/lib/runtime/gr_buffer.h
+++ b/gnuradio-core/src/lib/runtime/gr_buffer.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004,2009,2010 Free Software Foundation, Inc.
+ * Copyright 2004,2009,2010,2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -27,6 +27,7 @@
#include <boost/weak_ptr.hpp>
#include <gruel/thread.h>
#include <gruel/pmt.h>
+#include <deque>
class gr_vmcircbuf;
diff --git a/gnuradio-core/src/lib/runtime/gr_flowgraph.cc b/gnuradio-core/src/lib/runtime/gr_flowgraph.cc
index 27f6257cc..0d3bbb011 100644
--- a/gnuradio-core/src/lib/runtime/gr_flowgraph.cc
+++ b/gnuradio-core/src/lib/runtime/gr_flowgraph.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -28,6 +28,7 @@
#include <gr_io_signature.h>
#include <stdexcept>
#include <sstream>
+#include <iterator>
#define GR_FLOWGRAPH_DEBUG 0
diff --git a/gnuradio-core/src/python/gnuradio/Makefile.am b/gnuradio-core/src/python/gnuradio/Makefile.am
index a3f3518de..eff35e95c 100644
--- a/gnuradio-core/src/python/gnuradio/Makefile.am
+++ b/gnuradio-core/src/python/gnuradio/Makefile.am
@@ -1,5 +1,5 @@
#
-# Copyright 2004,2007,2008,2009,2010 Free Software Foundation, Inc.
+# Copyright 2004-2011 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -26,7 +26,6 @@ SUBDIRS = gr gru gruimpl blks2 blks2impl vocoder
grpython_PYTHON = \
__init__.py \
- audio.py \
eng_notation.py \
eng_option.py \
modulation_utils.py \
diff --git a/gnuradio-core/src/python/gnuradio/audio.py b/gnuradio-core/src/python/gnuradio/audio.py
deleted file mode 100644
index f6e921f0e..000000000
--- a/gnuradio-core/src/python/gnuradio/audio.py
+++ /dev/null
@@ -1,88 +0,0 @@
-#
-# Copyright 2004,2006 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-"""
-This is the 'generic' audio or soundcard interface.
-
-The behavior of this module is controlled by the [audio] audio_module
-configuration parameter. If it is 'auto' we attempt to import modules
-from the known_modules list, using the first one imported successfully.
-
-If [audio] audio_module is not 'auto', we assume it's the name of
-an audio module and attempt to import it.
-"""
-
-__all__ = ['source', 'sink']
-
-from gnuradio import gr
-import sys
-
-source = None
-sink = None
-
-
-known_modules = (
- 'audio_alsa', 'audio_oss', 'audio_osx', 'audio_jack', 'audio_portaudio', 'audio_windows')
-
-
-def try_import(name):
- """
- Build a blob of code and try to execute it.
- If it succeeds we will have set the globals source and sink
- as side effects.
-
- returns True or False
- """
- global source, sink
- full_name = "gnuradio." + name
- code = """
-import %s
-source = %s.source
-sink = %s.sink
-""" % (full_name, full_name, full_name)
- try:
- exec code in globals()
- return True
- except ImportError:
- return False
-
-
-def __init__ ():
- p = gr.prefs() # get preferences (config file) object
- verbose = p.get_bool('audio', 'verbose', False)
- module = p.get_string('audio', 'audio_module', 'auto')
-
- if module == 'auto': # search our list for the first one that we can import
- for m in known_modules:
- if try_import(m):
- if verbose: sys.stderr.write('audio: using %s\n' % (m,))
- return
- raise ImportError, 'Unable to locate an audio module.'
-
- else: # use the one the user specified
- if try_import(module):
- if verbose: sys.stderr.write('audio: using %s\n' % (module,))
- else:
- msg = 'Failed to import user-specified audio module %s' % (module,)
- if verbose: sys.stderr.write('audio: %s\n' % (msg,))
- raise ImportError, msg
-
-__init__()
diff --git a/gnuradio-examples/c++/Makefile.am b/gnuradio-examples/c++/Makefile.am
index 43c63847a..5a49e0e89 100644
--- a/gnuradio-examples/c++/Makefile.am
+++ b/gnuradio-examples/c++/Makefile.am
@@ -1,5 +1,5 @@
#
-# Copyright 2006,2008 Free Software Foundation, Inc.
+# Copyright 2011 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -20,4 +20,4 @@
#
include $(top_srcdir)/Makefile.common
-#SUBDIRS = dial_tone
+SUBDIRS = audio
diff --git a/gnuradio-examples/c++/dial_tone/.gitignore b/gnuradio-examples/c++/audio/.gitignore
index c5e345858..bb08aaf91 100644
--- a/gnuradio-examples/c++/dial_tone/.gitignore
+++ b/gnuradio-examples/c++/audio/.gitignore
@@ -1,5 +1,3 @@
-/.deps
-/.libs
/Makefile
/Makefile.in
/dial_tone
diff --git a/gnuradio-examples/c++/dial_tone/Makefile.am b/gnuradio-examples/c++/audio/Makefile.am
index 188275fca..88bd7c1fd 100644
--- a/gnuradio-examples/c++/dial_tone/Makefile.am
+++ b/gnuradio-examples/c++/audio/Makefile.am
@@ -1,5 +1,5 @@
#
-# Copyright 2006,2008,2009,2010 Free Software Foundation, Inc.
+# Copyright 2011 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -21,25 +21,18 @@
include $(top_srcdir)/Makefile.common
-# For compiling within the GNU Radio build tree
+# For compiling with the GNU Radio build tree, use include dir below.
+# For compiling outside the tree, use 'pkg-config --cflags gnuradio-audio'
AM_CPPFLAGS = \
- -I$(top_srcdir)/gr-audio-alsa/src \
+ -I$(top_srcdir)/gr-audio/include \
$(STD_DEFINES_AND_INCLUDES) \
$(WITH_INCLUDES)
-GR_AUDIO_ALSA_LA=$(top_builddir)/gr-audio-alsa/src/libgnuradio-audio-alsa.la
-
-# For compiling outside the tree, these will get fished out by pkgconfig
+# For compiling within the GNU Radio build tree, link against GR_AUDIO_LA
+# For compiling outside the tree, use 'pkg-config --libs gnuradio-audio'
+GR_AUDIO_LA=$(top_builddir)/gr-audio/lib/libgnuradio-audio.la
noinst_PROGRAMS = dial_tone
-noinst_HEADERS = \
- dial_tone.h
-
-dial_tone_SOURCES = \
- dial_tone.cc \
- main.cc
-
-dial_tone_LDADD = \
- $(GNURADIO_CORE_LA) \
- $(GR_AUDIO_ALSA_LA)
+dial_tone_SOURCES = dial_tone.cc
+dial_tone_LDADD = $(GNURADIO_CORE_LA) $(GR_AUDIO_LA)
diff --git a/gnuradio-examples/c++/audio/dial_tone.cc b/gnuradio-examples/c++/audio/dial_tone.cc
new file mode 100644
index 000000000..e4e3d8ceb
--- /dev/null
+++ b/gnuradio-examples/c++/audio/dial_tone.cc
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2011 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+/*
+ * GNU Radio C++ example creating dial tone
+ * ("the simplest thing that could possibly work")
+ *
+ * Send a tone each to the left and right channels of stereo audio
+ * output and let the user's brain sum them.
+ *
+ * GNU Radio makes extensive use of Boost shared pointers. Signal processing
+ * blocks are typically created by calling a "make" factory function, which
+ * returns an instance of the block as a typedef'd shared pointer that can
+ * be used in any way a regular pointer can. Shared pointers created this way
+ * keep track of their memory and free it at the right time, so the user
+ * doesn't need to worry about it (really).
+ *
+ */
+
+// Include header files for each block used in flowgraph
+#include <gr_top_block.h>
+#include <gr_sig_source_f.h>
+#include <gr_audio_sink.h>
+
+int main(int argc, char **argv)
+{
+ int rate = 48000; // Audio card sample rate
+ float ampl = 0.1; // Don't exceed 0.5 or clipping will occur
+
+ // Construct a top block that will contain flowgraph blocks. Alternatively,
+ // one may create a derived class from gr_top_block and hold instantiated blocks
+ // as member data for later manipulation.
+ gr_top_block_sptr tb = gr_make_top_block("dial_tone");
+
+ // Construct a real-valued signal source for each tone, at given sample rate
+ gr_sig_source_f_sptr src0 = gr_make_sig_source_f(rate, GR_SIN_WAVE, 350, ampl);
+ gr_sig_source_f_sptr src1 = gr_make_sig_source_f(rate, GR_SIN_WAVE, 440, ampl);
+
+ // Construct an audio sink to accept audio tones
+ audio_sink::sptr sink = audio_make_sink(rate);
+
+ // Connect output #0 of src0 to input #0 of sink (left channel)
+ tb->connect(src0, 0, sink, 0);
+
+ // Connect output #0 of src1 to input #1 of sink (right channel)
+ tb->connect(src1, 0, sink, 1);
+
+ // Tell GNU Radio runtime to start flowgraph threads; the foreground thread
+ // will block until either flowgraph exits (this example doesn't) or the
+ // application receives SIGINT (e.g., user hits CTRL-C).
+ //
+ // Real applications may use tb->start() which returns, allowing the foreground
+ // thread to proceed, then later use tb->stop(), followed by tb->wait(), to cleanup
+ // GNU Radio before exiting.
+ tb->run();
+
+ // Exit normally.
+ return 0;
+}
diff --git a/gnuradio-examples/c++/dial_tone/README b/gnuradio-examples/c++/dial_tone/README
deleted file mode 100644
index 6d5ed5059..000000000
--- a/gnuradio-examples/c++/dial_tone/README
+++ /dev/null
@@ -1,16 +0,0 @@
-This example requires that gr-audio-alsa be built in the main tree in order
-to compile successfully. It is not built automatically.
-
-To build this example, you must make two modifications to the build system:
-
-1) Add the following line inside config/grc_gnuradio_examples.m4:
-
- gnuradio-examples/c++/dial_tone/Makefile
-
- ...to the list of Makefiles already in there.
-
-2) In gnuradio-examples/c++/Makefile.am, uncomment the SUBDIRS line
-
-# SUBDIRS = dial_tone
-
-Then, from the top-level directory, re-run ./bootstrap and ./configure. \ No newline at end of file
diff --git a/gr-audio-alsa/.gitignore b/gr-audio-alsa/.gitignore
deleted file mode 100644
index cdcf41b15..000000000
--- a/gr-audio-alsa/.gitignore
+++ /dev/null
@@ -1,30 +0,0 @@
-/*.cache
-/*.la
-/*.lo
-/*.pc
-/.deps
-/.la
-/.libs
-/.lo
-/Makefile
-/Makefile.in
-/aclocal.m4
-/autom4te.cache
-/config.cache
-/config.h
-/config.h.in
-/config.log
-/config.status
-/configure
-/depcomp
-/install-sh
-/libtool
-/ltmain.sh
-/make.log
-/missing
-/missing
-/mkinstalldirs
-/py-compile
-/stamp-h
-/stamp-h.in
-/stamp-h1
diff --git a/gr-audio-alsa/build-stamp b/gr-audio-alsa/build-stamp
deleted file mode 100644
index e69de29bb..000000000
--- a/gr-audio-alsa/build-stamp
+++ /dev/null
diff --git a/gr-audio-alsa/gnuradio-audio-alsa.pc.in b/gr-audio-alsa/gnuradio-audio-alsa.pc.in
deleted file mode 100644
index d5147e6af..000000000
--- a/gr-audio-alsa/gnuradio-audio-alsa.pc.in
+++ /dev/null
@@ -1,11 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: gnuradio-audio-alsa
-Description: The GNU Radio block for the ALSA sound system
-Requires: gnuradio-core alsa
-Version: @LIBVER@
-Libs: -L${libdir} -lgnuradio-audio-alsa
-Cflags: -I${includedir}
diff --git a/gr-audio-alsa/src/.gitignore b/gr-audio-alsa/src/.gitignore
deleted file mode 100644
index 8de8fe39c..000000000
--- a/gr-audio-alsa/src/.gitignore
+++ /dev/null
@@ -1,20 +0,0 @@
-/Makefile
-/Makefile.in
-/.la
-/.lo
-/.deps
-/.libs
-/*.la
-/*.lo
-/usrp.py
-/usrp.cc
-/audio_oss.cc
-/audio_oss.py
-/audio_alsa.py
-/audio_alsa.cc
-/run_tests
-/run_guile_tests
-/*.pyc
-/gnuradio
-/guile
-/python
diff --git a/gr-audio-alsa/src/Makefile.am b/gr-audio-alsa/src/Makefile.am
deleted file mode 100644
index 330158aa5..000000000
--- a/gr-audio-alsa/src/Makefile.am
+++ /dev/null
@@ -1,88 +0,0 @@
-#
-# Copyright 2004,2008,2009,2010 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-include $(top_srcdir)/Makefile.common
-include $(top_srcdir)/Makefile.swig
-
-TESTS =
-EXTRA_DIST += run_tests.in run_guile_tests.in
-DISTCLEANFILES += run_tests run_guile_tests
-
-# C/C++ headers get installed in ${prefix}/include/gnuradio
-grinclude_HEADERS = \
- audio_alsa_sink.h \
- audio_alsa_source.h
-
-noinst_HEADERS = \
- gri_alsa.h
-
-noinst_PYTHON = \
- qa_audio_alsa.py
-
-noinst_GUILE = \
- audio_alsa.test
-
-
-AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
-
-# ------------------------------------------------------------------------
-# ALSA C++ library, including OS interface, sink, and source
-
-lib_LTLIBRARIES = libgnuradio-audio-alsa.la
-
-libgnuradio_audio_alsa_la_SOURCES = \
- audio_alsa_sink.cc \
- audio_alsa_source.cc \
- gri_alsa.cc
-
-libgnuradio_audio_alsa_la_LIBADD = \
- $(GNURADIO_CORE_LA) \
- $(ALSA_LIBS)
-
-libgnuradio_audio_alsa_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS)
-
-
-# ------------------------------------------------------------------------
-# SWIG generated bindings
-
-TOP_SWIG_IFILES = \
- audio_alsa.i
-
-# Install so that they end up available as:
-# import gnuradio.audio_alsa
-# This ends up at:
-# ${prefix}/lib/python${python_version}/site-packages/gnuradio
-audio_alsa_pythondir_category = \
- gnuradio
-
-# additional libraries for linking with the SWIG-generated library
-audio_alsa_la_swig_libadd = \
- libgnuradio-audio-alsa.la
-
-if PYTHON
-TESTS += run_tests
-endif
-
-if GUILE
-TESTS += run_guile_tests
-endif
-
-
diff --git a/gr-audio-alsa/src/audio_alsa.i b/gr-audio-alsa/src/audio_alsa.i
deleted file mode 100644
index 215acf33d..000000000
--- a/gr-audio-alsa/src/audio_alsa.i
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2006,2009 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-%include "gnuradio.i" // the common stuff
-
-%{
-#include "audio_alsa_sink.h"
-#include "audio_alsa_source.h"
-%}
-
-// ----------------------------------------------------------------
-
-GR_SWIG_BLOCK_MAGIC(audio_alsa,source)
-
-audio_alsa_source_sptr
-audio_alsa_make_source (int sampling_rate,
- const std::string dev = "",
- bool ok_to_block = true
- ) throw (std::runtime_error);
-
-class audio_alsa_source : public gr_sync_block {
-
- protected:
- audio_alsa_source (int sampling_rate,
- const std::string device_name,
- bool ok_to_block = true
- ) throw (std::runtime_error);
-
- public:
- ~audio_alsa_source ();
-
- bool start();
- bool stop();
-};
-
-// ----------------------------------------------------------------
-
-GR_SWIG_BLOCK_MAGIC(audio_alsa,sink)
-
-audio_alsa_sink_sptr
-audio_alsa_make_sink (int sampling_rate,
- const std::string dev = "",
- bool ok_to_block = true
- ) throw (std::runtime_error);
-
-class audio_alsa_sink : public gr_sync_block {
-
- protected:
- audio_alsa_sink (int sampling_rate,
- const std::string device_name,
- bool ok_to_block
- ) throw (std::runtime_error);
-
- public:
- ~audio_alsa_sink ();
-};
-
-#if SWIGGUILE
-%scheme %{
-(load-extension-global "libguile-gnuradio-audio_alsa" "scm_init_gnuradio_audio_alsa_module")
-%}
-
-%goops %{
-(use-modules (gnuradio gnuradio_core_runtime))
-%}
-#endif
diff --git a/gr-audio-alsa/src/audio_alsa.test b/gr-audio-alsa/src/audio_alsa.test
deleted file mode 100644
index 7997b9283..000000000
--- a/gr-audio-alsa/src/audio_alsa.test
+++ /dev/null
@@ -1,37 +0,0 @@
-;;; -*- Scheme -*-
-;;;
-;;; Copyright 2010 Free Software Foundation, Inc.
-;;;
-;;; This file is part of GNU Radio
-;;;
-;;; GNU Radio is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 3, or (at your option)
-;;; any later version.
-;;;
-;;; GNU Radio is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
-;;;
-
-;;; If you're using Emacs's Scheme mode:
-;;; (put 'with-test-prefix 'scheme-indent-function 1)
-
-;;; See the comments in gnuradio/test-suite/lib.scm for info on writing tests.
-;;; See also the very end of the file, where the test-equal, test-eqv
-;;; and test-eq macros are defined.
-
-(define-module (test-module)
- #:use-module (oop goops)
- #:use-module (gnuradio core)
- #:use-module (gnuradio test-suite lib)
- #:duplicates (merge-generics replace check))
-
-;;; Just see if we can import the module...
-;;; They may not have ALSA drivers, etc.
-
-(use-modules (gnuradio audio_alsa))
diff --git a/gr-audio-alsa/src/qa_audio_alsa.py b/gr-audio-alsa/src/qa_audio_alsa.py
deleted file mode 100755
index 52dbfdc7a..000000000
--- a/gr-audio-alsa/src/qa_audio_alsa.py
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2005,2007,2010 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-from gnuradio import gr, gr_unittest
-import audio_alsa
-
-class test_audio_alsa (gr_unittest.TestCase):
-
- def setUp (self):
- self.tb = gr.top_block ()
-
- def tearDown (self):
- self.tb = None
-
- def test_000_nop (self):
- """Just see if we can import the module...
- They may not have ALSA drivers, etc. Don't try to run anything"""
- pass
-
-if __name__ == '__main__':
- gr_unittest.run(test_audio_alsa, "test_audio_alsa.xml")
diff --git a/gr-audio-alsa/src/run_guile_tests.in b/gr-audio-alsa/src/run_guile_tests.in
deleted file mode 100644
index 5d08b0dd5..000000000
--- a/gr-audio-alsa/src/run_guile_tests.in
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-
-. @top_builddir@/setup_guile_test_env
-
-# 1st argument is absolute path to hand coded guile source directory
-# 2nd argument is absolute path to component C++ shared library build directory
-# 3nd argument is absolute path to component SWIG build directory
-
-add_local_paths \
- @srcdir@ \
- @abs_builddir@ \
- @abs_builddir@
-
-@GUILE@ -e main -c '(use-modules (gnuradio test-suite guile-test))' -t @srcdir@
diff --git a/gr-audio-alsa/src/run_tests.in b/gr-audio-alsa/src/run_tests.in
deleted file mode 100644
index fd3963068..000000000
--- a/gr-audio-alsa/src/run_tests.in
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-# 1st parameter is absolute path to component source directory
-# 2nd parameter is absolute path to component build directory
-# 3rd parameter is path to Python QA directory
-
-@top_builddir@/run_tests.sh \
- @abs_top_srcdir@/gr-audio-alsa \
- @abs_top_builddir@/gr-audio-alsa \
- @srcdir@
diff --git a/gr-audio-jack/.gitignore b/gr-audio-jack/.gitignore
deleted file mode 100644
index cdcf41b15..000000000
--- a/gr-audio-jack/.gitignore
+++ /dev/null
@@ -1,30 +0,0 @@
-/*.cache
-/*.la
-/*.lo
-/*.pc
-/.deps
-/.la
-/.libs
-/.lo
-/Makefile
-/Makefile.in
-/aclocal.m4
-/autom4te.cache
-/config.cache
-/config.h
-/config.h.in
-/config.log
-/config.status
-/configure
-/depcomp
-/install-sh
-/libtool
-/ltmain.sh
-/make.log
-/missing
-/missing
-/mkinstalldirs
-/py-compile
-/stamp-h
-/stamp-h.in
-/stamp-h1
diff --git a/gr-audio-jack/gnuradio-audio-jack.pc.in b/gr-audio-jack/gnuradio-audio-jack.pc.in
deleted file mode 100644
index 8fb4a2e0d..000000000
--- a/gr-audio-jack/gnuradio-audio-jack.pc.in
+++ /dev/null
@@ -1,11 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: gnuradio-audio-jack
-Description: GNU Radio blocks for the JACK sound system
-Requires: gnuradio-core jack
-Version: @LIBVER@
-Libs: -L${libdir} -lgnuradio-audio-jack
-Cflags: -I${includedir}
diff --git a/gr-audio-jack/src/.gitignore b/gr-audio-jack/src/.gitignore
deleted file mode 100644
index 347796beb..000000000
--- a/gr-audio-jack/src/.gitignore
+++ /dev/null
@@ -1,15 +0,0 @@
-/Makefile
-/Makefile.in
-/.la
-/.lo
-/.deps
-/.libs
-/*.la
-/*.lo
-/*.pyc
-/audio_jack.cc
-/audio_jack.py
-/run_tests
-/gnuradio
-/guile
-/python
diff --git a/gr-audio-jack/src/Makefile.am b/gr-audio-jack/src/Makefile.am
deleted file mode 100644
index 9a0c8b9be..000000000
--- a/gr-audio-jack/src/Makefile.am
+++ /dev/null
@@ -1,75 +0,0 @@
-#
-# Copyright 2005,2008,2009,2010 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-include $(top_srcdir)/Makefile.common
-include $(top_srcdir)/Makefile.swig
-
-TESTS =
-EXTRA_DIST += run_tests.in
-DISTCLEANFILES += run_tests
-
-# C/C++ headers get installed in ${prefix}/include/gnuradio
-grinclude_HEADERS = \
- audio_jack_sink.h \
- audio_jack_source.h
-
-noinst_HEADERS = \
- gri_jack.h
-
-lib_LTLIBRARIES = libgnuradio-audio-jack.la
-
-libgnuradio_audio_jack_la_SOURCES = \
- audio_jack_sink.cc \
- audio_jack_source.cc \
- gri_jack.cc
-
-libgnuradio_audio_jack_la_LIBADD = \
- $(GNURADIO_CORE_LA) \
- $(JACK_LIBS)
-
-libgnuradio_audio_jack_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS)
-
-noinst_PYTHON = \
- qa_jack.py
-
-AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
-
-###################################
-# SWIG interfaces and libraries
-
-TOP_SWIG_IFILES = \
- audio_jack.i
-
-# Install so that they end up available as:
-# import gnuradio.audio_jack
-# This ends up at:
-# ${prefix}/lib/python${python_version}/site-packages/gnuradio
-audio_jack_pythondir_category = \
- gnuradio
-
-# additional libraries for linking with the SWIG-generated library
-audio_jack_la_swig_libadd = \
- libgnuradio-audio-jack.la
-
-
-if PYTHON
-TESTS += run_tests
-endif
diff --git a/gr-audio-jack/src/Makefile.swig.gen b/gr-audio-jack/src/Makefile.swig.gen
deleted file mode 100644
index 9ca8140d4..000000000
--- a/gr-audio-jack/src/Makefile.swig.gen
+++ /dev/null
@@ -1,145 +0,0 @@
-# -*- Makefile -*-
-#
-# Copyright 2009 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-# Makefile.swig.gen for audio_jack.i
-
-## Default install locations for these files:
-##
-## Default location for the Python directory is:
-## ${prefix}/lib/python${python_version}/site-packages/[category]/audio_jack
-## Default location for the Python exec directory is:
-## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/audio_jack
-##
-## The following can be overloaded to change the install location, but
-## this has to be done in the including Makefile.am -before-
-## Makefile.swig is included.
-
-audio_jack_pythondir_category ?= gnuradio/audio_jack
-audio_jack_pylibdir_category ?= $(audio_jack_pythondir_category)
-audio_jack_pythondir = $(pythondir)/$(audio_jack_pythondir_category)
-audio_jack_pylibdir = $(pyexecdir)/$(audio_jack_pylibdir_category)
-
-# The .so libraries for the guile modules get installed whereever guile
-# is installed, usually /usr/lib/guile/gnuradio/
-# FIXME: determince whether these should be installed with gnuradio.
-audio_jack_scmlibdir = $(libdir)
-
-# The scm files for the guile modules get installed where ever guile
-# is installed, usually /usr/share/guile/site/audio_jack
-# FIXME: determince whether these should be installed with gnuradio.
-audio_jack_scmdir = $(guiledir)
-
-## SWIG headers are always installed into the same directory.
-
-audio_jack_swigincludedir = $(swigincludedir)
-
-## This is a template file for a "generated" Makefile addition (in
-## this case, "Makefile.swig.gen"). By including the top-level
-## Makefile.swig, this file will be used to generate the SWIG
-## dependencies. Assign the variable TOP_SWIG_FILES to be the list of
-## SWIG .i files to generated wrappings for; there can be more than 1
-## so long as the names are unique (no sorting is done on the
-## TOP_SWIG_FILES list). This file explicitly assumes that a SWIG .i
-## file will generate .cc, .py, and possibly .h files -- meaning that
-## all of these files will have the same base name (that provided for
-## the SWIG .i file).
-##
-## This code is setup to ensure parallel MAKE ("-j" or "-jN") does the
-## right thing. For more info, see <
-## http://sources.redhat.com/automake/automake.html#Multiple-Outputs >
-
-## Other cleaned files: dependency files generated by SWIG or this Makefile
-
-MOSTLYCLEANFILES += $(DEPDIR)/*.S*
-
-## Various SWIG variables. These can be overloaded in the including
-## Makefile.am by setting the variable value there, then including
-## Makefile.swig .
-
-audio_jack_swiginclude_HEADERS = \
- audio_jack.i \
- $(audio_jack_swiginclude_headers)
-
-if PYTHON
-audio_jack_pylib_LTLIBRARIES = \
- _audio_jack.la
-
-_audio_jack_la_SOURCES = \
- python/audio_jack.cc \
- $(audio_jack_la_swig_sources)
-
-audio_jack_python_PYTHON = \
- audio_jack.py \
- $(audio_jack_python)
-
-_audio_jack_la_LIBADD = \
- $(STD_SWIG_LA_LIB_ADD) \
- $(audio_jack_la_swig_libadd)
-
-_audio_jack_la_LDFLAGS = \
- $(STD_SWIG_LA_LD_FLAGS) \
- $(audio_jack_la_swig_ldflags)
-
-_audio_jack_la_CXXFLAGS = \
- $(STD_SWIG_CXX_FLAGS) \
- -I$(top_builddir) \
- $(audio_jack_la_swig_cxxflags)
-
-python/audio_jack.cc: audio_jack.py
-audio_jack.py: audio_jack.i
-
-# Include the python dependencies for this file
--include python/audio_jack.d
-
-endif # end of if python
-
-if GUILE
-
-audio_jack_scmlib_LTLIBRARIES = \
- libguile-gnuradio-audio_jack.la
-libguile_gnuradio_audio_jack_la_SOURCES = \
- guile/audio_jack.cc \
- $(audio_jack_la_swig_sources)
-nobase_audio_jack_scm_DATA = \
- gnuradio/audio_jack.scm \
- gnuradio/audio_jack-primitive.scm
-libguile_gnuradio_audio_jack_la_LIBADD = \
- $(STD_SWIG_LA_LIB_ADD) \
- $(audio_jack_la_swig_libadd)
-libguile_gnuradio_audio_jack_la_LDFLAGS = \
- $(STD_SWIG_LA_LD_FLAGS) \
- $(audio_jack_la_swig_ldflags)
-libguile_gnuradio_audio_jack_la_CXXFLAGS = \
- $(STD_SWIG_CXX_FLAGS) \
- -I$(top_builddir) \
- $(audio_jack_la_swig_cxxflags)
-
-guile/audio_jack.cc: gnuradio/audio_jack.scm
-gnuradio/audio_jack.scm: audio_jack.i
-gnuradio/audio_jack-primitive.scm: gnuradio/audio_jack.scm
-
-# Include the guile dependencies for this file
--include guile/audio_jack.d
-
-endif # end of GUILE
-
-
diff --git a/gr-audio-jack/src/audio_jack.i b/gr-audio-jack/src/audio_jack.i
deleted file mode 100644
index 67747cb16..000000000
--- a/gr-audio-jack/src/audio_jack.i
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2005,2009 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-%include "gnuradio.i" // the common stuff
-
-%{
-#include "audio_jack_sink.h"
-#include "audio_jack_source.h"
-%}
-
-// ----------------------------------------------------------------
-
-GR_SWIG_BLOCK_MAGIC(audio_jack,source)
-
-audio_jack_source_sptr
-audio_jack_make_source (int sampling_rate,
- const std::string dev = "",
- bool ok_to_block = true
- ) throw (std::runtime_error);
-
-class audio_jack_source : public gr_sync_block {
-
- protected:
- audio_jack_source (int sampling_rate,
- const std::string device_name,
- bool ok_to_block
- ) throw (std::runtime_error);
-
- public:
- ~audio_jack_source ();
-
- bool start();
- bool stop();
-};
-
-// ----------------------------------------------------------------
-
-GR_SWIG_BLOCK_MAGIC(audio_jack,sink)
-
-audio_jack_sink_sptr
-audio_jack_make_sink (int sampling_rate,
- const std::string dev = "",
- bool ok_to_block = true
- ) throw (std::runtime_error);
-
-class audio_jack_sink : public gr_sync_block {
-
- protected:
- audio_jack_sink (int sampling_rate,
- const std::string device_name,
- bool ok_to_block
- ) throw (std::runtime_error);
-
- public:
- ~audio_jack_sink ();
-};
-
-#if SWIGGUILE
-%scheme %{
-(load-extension-global "libguile-gnuradio-audio_jack" "scm_init_gnuradio_audio_jack_module")
-%}
-
-%goops %{
-(use-modules (gnuradio gnuradio_core_runtime))
-%}
-#endif
diff --git a/gr-audio-jack/src/qa_jack.py b/gr-audio-jack/src/qa_jack.py
deleted file mode 100755
index ad6bee27b..000000000
--- a/gr-audio-jack/src/qa_jack.py
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2005,2010 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-from gnuradio import gr, gr_unittest
-import audio_jack
-
-class test_audio_jack (gr_unittest.TestCase):
-
- def setUp (self):
- self.tb = gr.top_block ()
-
- def tearDown (self):
- self.tb = None
-
- def test_000_nop (self):
- """Just see if we can import the module...
- They may not have JACK library, etc. Don't try to run anything"""
- pass
-
-if __name__ == '__main__':
- gr_unittest.run(test_audio_jack, "test_audio_jack.xml")
diff --git a/gr-audio-jack/src/run_tests.in b/gr-audio-jack/src/run_tests.in
deleted file mode 100644
index 77af85641..000000000
--- a/gr-audio-jack/src/run_tests.in
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-# 1st parameter is absolute path to component source directory
-# 2nd parameter is absolute path to component build directory
-# 3rd parameter is path to Python QA directory
-
-@top_builddir@/run_tests.sh \
- @abs_top_srcdir@/gr-audio-jack \
- @abs_top_builddir@/gr-audio-jack \
- @srcdir@
diff --git a/gr-audio-oss/.gitignore b/gr-audio-oss/.gitignore
deleted file mode 100644
index cdcf41b15..000000000
--- a/gr-audio-oss/.gitignore
+++ /dev/null
@@ -1,30 +0,0 @@
-/*.cache
-/*.la
-/*.lo
-/*.pc
-/.deps
-/.la
-/.libs
-/.lo
-/Makefile
-/Makefile.in
-/aclocal.m4
-/autom4te.cache
-/config.cache
-/config.h
-/config.h.in
-/config.log
-/config.status
-/configure
-/depcomp
-/install-sh
-/libtool
-/ltmain.sh
-/make.log
-/missing
-/missing
-/mkinstalldirs
-/py-compile
-/stamp-h
-/stamp-h.in
-/stamp-h1
diff --git a/gr-audio-oss/src/.gitignore b/gr-audio-oss/src/.gitignore
deleted file mode 100644
index c082252f9..000000000
--- a/gr-audio-oss/src/.gitignore
+++ /dev/null
@@ -1,17 +0,0 @@
-/Makefile
-/Makefile.in
-/.la
-/.lo
-/.deps
-/.libs
-/*.la
-/*.lo
-/usrp.py
-/usrp.cc
-/audio_oss.cc
-/audio_oss.py
-/run_tests
-/*.pyc
-/gnuradio
-/guile
-/python
diff --git a/gr-audio-oss/src/Makefile.swig.gen b/gr-audio-oss/src/Makefile.swig.gen
deleted file mode 100644
index ecb03acce..000000000
--- a/gr-audio-oss/src/Makefile.swig.gen
+++ /dev/null
@@ -1,145 +0,0 @@
-# -*- Makefile -*-
-#
-# Copyright 2009 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-# Makefile.swig.gen for audio_oss.i
-
-## Default install locations for these files:
-##
-## Default location for the Python directory is:
-## ${prefix}/lib/python${python_version}/site-packages/[category]/audio_oss
-## Default location for the Python exec directory is:
-## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/audio_oss
-##
-## The following can be overloaded to change the install location, but
-## this has to be done in the including Makefile.am -before-
-## Makefile.swig is included.
-
-audio_oss_pythondir_category ?= gnuradio/audio_oss
-audio_oss_pylibdir_category ?= $(audio_oss_pythondir_category)
-audio_oss_pythondir = $(pythondir)/$(audio_oss_pythondir_category)
-audio_oss_pylibdir = $(pyexecdir)/$(audio_oss_pylibdir_category)
-
-# The .so libraries for the guile modules get installed whereever guile
-# is installed, usually /usr/lib/guile/gnuradio/
-# FIXME: determince whether these should be installed with gnuradio.
-audio_oss_scmlibdir = $(libdir)
-
-# The scm files for the guile modules get installed where ever guile
-# is installed, usually /usr/share/guile/site/audio_oss
-# FIXME: determince whether these should be installed with gnuradio.
-audio_oss_scmdir = $(guiledir)
-
-## SWIG headers are always installed into the same directory.
-
-audio_oss_swigincludedir = $(swigincludedir)
-
-## This is a template file for a "generated" Makefile addition (in
-## this case, "Makefile.swig.gen"). By including the top-level
-## Makefile.swig, this file will be used to generate the SWIG
-## dependencies. Assign the variable TOP_SWIG_FILES to be the list of
-## SWIG .i files to generated wrappings for; there can be more than 1
-## so long as the names are unique (no sorting is done on the
-## TOP_SWIG_FILES list). This file explicitly assumes that a SWIG .i
-## file will generate .cc, .py, and possibly .h files -- meaning that
-## all of these files will have the same base name (that provided for
-## the SWIG .i file).
-##
-## This code is setup to ensure parallel MAKE ("-j" or "-jN") does the
-## right thing. For more info, see <
-## http://sources.redhat.com/automake/automake.html#Multiple-Outputs >
-
-## Other cleaned files: dependency files generated by SWIG or this Makefile
-
-MOSTLYCLEANFILES += $(DEPDIR)/*.S*
-
-## Various SWIG variables. These can be overloaded in the including
-## Makefile.am by setting the variable value there, then including
-## Makefile.swig .
-
-audio_oss_swiginclude_HEADERS = \
- audio_oss.i \
- $(audio_oss_swiginclude_headers)
-
-if PYTHON
-audio_oss_pylib_LTLIBRARIES = \
- _audio_oss.la
-
-_audio_oss_la_SOURCES = \
- python/audio_oss.cc \
- $(audio_oss_la_swig_sources)
-
-audio_oss_python_PYTHON = \
- audio_oss.py \
- $(audio_oss_python)
-
-_audio_oss_la_LIBADD = \
- $(STD_SWIG_LA_LIB_ADD) \
- $(audio_oss_la_swig_libadd)
-
-_audio_oss_la_LDFLAGS = \
- $(STD_SWIG_LA_LD_FLAGS) \
- $(audio_oss_la_swig_ldflags)
-
-_audio_oss_la_CXXFLAGS = \
- $(STD_SWIG_CXX_FLAGS) \
- -I$(top_builddir) \
- $(audio_oss_la_swig_cxxflags)
-
-python/audio_oss.cc: audio_oss.py
-audio_oss.py: audio_oss.i
-
-# Include the python dependencies for this file
--include python/audio_oss.d
-
-endif # end of if python
-
-if GUILE
-
-audio_oss_scmlib_LTLIBRARIES = \
- libguile-gnuradio-audio_oss.la
-libguile_gnuradio_audio_oss_la_SOURCES = \
- guile/audio_oss.cc \
- $(audio_oss_la_swig_sources)
-nobase_audio_oss_scm_DATA = \
- gnuradio/audio_oss.scm \
- gnuradio/audio_oss-primitive.scm
-libguile_gnuradio_audio_oss_la_LIBADD = \
- $(STD_SWIG_LA_LIB_ADD) \
- $(audio_oss_la_swig_libadd)
-libguile_gnuradio_audio_oss_la_LDFLAGS = \
- $(STD_SWIG_LA_LD_FLAGS) \
- $(audio_oss_la_swig_ldflags)
-libguile_gnuradio_audio_oss_la_CXXFLAGS = \
- $(STD_SWIG_CXX_FLAGS) \
- -I$(top_builddir) \
- $(audio_oss_la_swig_cxxflags)
-
-guile/audio_oss.cc: gnuradio/audio_oss.scm
-gnuradio/audio_oss.scm: audio_oss.i
-gnuradio/audio_oss-primitive.scm: gnuradio/audio_oss.scm
-
-# Include the guile dependencies for this file
--include guile/audio_oss.d
-
-endif # end of GUILE
-
-
diff --git a/gr-audio-oss/src/audio_oss.i b/gr-audio-oss/src/audio_oss.i
deleted file mode 100644
index 2150cba9f..000000000
--- a/gr-audio-oss/src/audio_oss.i
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2009 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-%include "gnuradio.i" // the common stuff
-
-%{
-#include "audio_oss_sink.h"
-#include "audio_oss_source.h"
-%}
-
-// ----------------------------------------------------------------
-
-GR_SWIG_BLOCK_MAGIC(audio_oss,sink)
-
-audio_oss_sink_sptr
-audio_oss_make_sink (int sampling_rate,
- const std::string dev = "",
- bool ok_to_block = true
- ) throw (std::runtime_error);
-
-
-class audio_oss_sink : public gr_sync_block {
- protected:
- audio_oss_sink (int sampling_rate, const std::string device_name = "", bool ok_to_block = true);
-
- public:
- ~audio_oss_sink ();
-};
-
-// ----------------------------------------------------------------
-
-GR_SWIG_BLOCK_MAGIC(audio_oss,source)
-
-audio_oss_source_sptr
-audio_oss_make_source (int sampling_rate,
- const std::string dev = "",
- bool ok_to_block = true
- ) throw (std::runtime_error);
-
-class audio_oss_source : public gr_sync_block {
- protected:
- audio_oss_source (int sampling_rate, const std::string device_name = "", bool ok_to_block = true);
-
- public:
- ~audio_oss_source ();
-};
-
-#if SWIGGUILE
-%scheme %{
-(load-extension-global "libguile-gnuradio-audio_oss" "scm_init_gnuradio_audio_oss_module")
-%}
-
-%goops %{
-(use-modules (gnuradio gnuradio_core_runtime))
-%}
-#endif
diff --git a/gr-audio-oss/src/qa_oss.py b/gr-audio-oss/src/qa_oss.py
deleted file mode 100755
index 365dabc25..000000000
--- a/gr-audio-oss/src/qa_oss.py
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2005,2007,2010 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-from gnuradio import gr, gr_unittest
-import audio_oss
-
-class test_audio_oss (gr_unittest.TestCase):
-
- def setUp (self):
- self.tb = gr.top_block ()
-
- def tearDown (self):
- self.tb = None
-
- def test_000_nop (self):
- """Just see if we can import the module...
- They may not have OSS drivers, etc. Don't try to run anything"""
- pass
-
-if __name__ == '__main__':
- gr_unittest.run(test_audio_oss, "test_audio_oss.xml")
diff --git a/gr-audio-oss/src/run_tests.in b/gr-audio-oss/src/run_tests.in
deleted file mode 100644
index b1a64c212..000000000
--- a/gr-audio-oss/src/run_tests.in
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-# 1st parameter is absolute path to component source directory
-# 2nd parameter is absolute path to component build directory
-# 3rd parameter is path to Python QA directory
-
-@top_builddir@/run_tests.sh \
- @abs_top_srcdir@/gr-audio-oss \
- @abs_top_builddir@/gr-audio-oss \
- @srcdir@
diff --git a/gr-audio-osx/.gitignore b/gr-audio-osx/.gitignore
deleted file mode 100644
index cdcf41b15..000000000
--- a/gr-audio-osx/.gitignore
+++ /dev/null
@@ -1,30 +0,0 @@
-/*.cache
-/*.la
-/*.lo
-/*.pc
-/.deps
-/.la
-/.libs
-/.lo
-/Makefile
-/Makefile.in
-/aclocal.m4
-/autom4te.cache
-/config.cache
-/config.h
-/config.h.in
-/config.log
-/config.status
-/configure
-/depcomp
-/install-sh
-/libtool
-/ltmain.sh
-/make.log
-/missing
-/missing
-/mkinstalldirs
-/py-compile
-/stamp-h
-/stamp-h.in
-/stamp-h1
diff --git a/gr-audio-osx/README_OSX b/gr-audio-osx/README_OSX
deleted file mode 100644
index 2a98e96bb..000000000
--- a/gr-audio-osx/README_OSX
+++ /dev/null
@@ -1,61 +0,0 @@
-Michael Dickens
-2006-Apr-30
-
-0) This module should compile and install in the same manner as the
-other GNURadio modules (e.g. gnuradio-core), with the possible
-exception that GNU libtool 1.5.20 or newer should be installed and
-used (if not first in the path) via "make LIBTOOL=/..." and so forth.
-Version 1.5.10 has failed making, and while picking version 1.5.20 is
-somewhat arbitrary, the newer version compiles and installs easily
-under OSX.
-
-1) This module should be automatically loaded by the Python command
-"from gr import audio". The audio import script will automatically
-select gr.audio_osx if it is available (though it will try to import
-ALSA first, then OSS, then OSX, and finally WINDOWS audio modules, in
-that order). If that import command doesn't work, try reinstalling
-gnuradio-core from scratch followed by gr-audio-osx.
-
-2) Instantiation arguments for either source or sink are:
-
-* sample_rate : integer : default == 44100
- OSX converts the integer sample rate to a double internally; it
- would be nice to have this input as a double natively, but that
- doesn't work with other audio devices.
-
-* device_name : string : default == "2"
- For OSX, the device name should be an integer string. This value is
- the maximum number of channels to allocate (for input or output).
- In the "source" case (input), the actual number of channels will be
- whatever is available on that current system input device. In the
- "sink" case (output), OSX will convert the provided channels into
- whatever format is required by the current system output device.
- For example, "3" would try to setup for 3 input or output channels.
- NOTE that this is a very different use than that for other audio
- modules (though they can interpret the number of channels from this
- argument).
-
-* do_block : boolean : default == true
- If the data transfer buffer between OSX internals and GNURadio gets
- full, either block (true) or overwrite (false) depending on this
- variable.
-
-The following are currently non-standard arguments:
-
-* channel_config : integer : default == -1
- An enum (internally) describing the channel configuration. Not
- currently used, but rather reserved for future expansion.
-
-* max_sample_count : integer : default == -1
- The maximum number of samples to buffer between OSX internals and
- GNURadio. The value -1 is mapped to 1 second's worth of data.
-
-3) When the buffer is full and do_block is false and new data comes
-in, the oldest data will be overwritten. The source will print out
-"iX" each time this happens; the sink will print out "oX".
-
-4) In the "src" directory is a python script "test_audio_loop" which
-connects the default audio input device to the default audio output
-device. This script is very useful in testing that audio is correctly
-installed and both the source and sink are functional. This script is
-not run by "make check".
diff --git a/gr-audio-osx/TODO b/gr-audio-osx/TODO
deleted file mode 100644
index e36ed2b25..000000000
--- a/gr-audio-osx/TODO
+++ /dev/null
@@ -1,51 +0,0 @@
-List as of 2006-Apr-22, by Michael Dickens, primary author
-
-* Change buffering to use gr_buffer's and necessary related classes.
- Currently uses a circular_buffer I wrote myself (in
- ./src/circular_buffer.h ), which hides the "circular" part from the
- user but otherwise is very fast as well as thread safe.
-
-* A current limitation of this implementation is that the user cannot
- dynamically switch audio devices (input or output) during playback
- and use the new device without stopping the current executing GR and
- restarting the process. I would like to figure out how to get a
- CoreAudio "listener" for when the default hardware input / output
- device changes (e.g. when switched by the user in the "Sound" system
- preference pane). The code in ./src/audio-osx-source.cc creates
- listeners for the AudioUnit being used as well as the Hardware
- device, but these for some reason don't do the trick. It's possible
- that the Python framework doesn't allow for one to do this.
-
-* In both the source and sink, move the code which defines the "Audio
- Stream Basic Description" (ASBD) to a routine to do this as needed
- as start-up as well as in a callback ("listener") if the default
- device changes.
-
-* Tweak the mutex (d_internal) to only where it is truly needed
- (around class-specific variables used across all threads) in order
- to improve performance. Currently the mutex is used at the
- start and end of any function requiring access to the class variables.
-
-* Change the instantiation arguments ... once those arguments are
- finalized. Right now gr.audio.source () takes the sample rate (int
- - should be double), the device name (std::string), a boolean for
- blocking or not, and 2 completely non-standard ones for channel
- configuration and the maximum sample count to buffer. These are
- reasonable for OSX, but might not be for other OSs. Nothing to do
- right now but wait and discuss.
-
-* Once the previous issue has been resolved, then the current method
- of determining the number of channels needs to be updated.
- Currently the "device_name" for OSX should contain a numeric string
- for the maximum number of channels to use (e.g. "3" means 3
- channels, generally mapped to 2 channel stereo by OSX). The
- "device_name" is generally input via "-O" in Python scripts, so "-O
- 3" would allow for 3 incoming output channels (or fewer). In theory
- the "channel_config" argument would make more sense for determining
- channel usage. Example config strings might be "2.1" for stereo w/
- subwoofer (3 channels), "5.1" or "6.1" for various surround w/
- subwoofer (6 & 7 channels, respectively). OSX can handle all sorts
- of channel configurations, but the names for these will be different
- than those use for OSS or ALMA or Windows ... thus the need for a
- common naming scheme for all cared-about configurations, possibly
- with options for other OS-specific options.
diff --git a/gr-audio-osx/src/.gitignore b/gr-audio-osx/src/.gitignore
deleted file mode 100644
index 7e84b05b3..000000000
--- a/gr-audio-osx/src/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-/Makefile
-/Makefile.in
-/.la
-/.lo
-/.deps
-/.libs
-/*.la
-/*.lo
-/usrp.py
-/usrp.cc
-/audio_osx.cc
-/audio_osx.py
-/run_tests
-/gnuradio
-/guile
-/python
diff --git a/gr-audio-osx/src/Makefile.am b/gr-audio-osx/src/Makefile.am
deleted file mode 100644
index fce31c9d2..000000000
--- a/gr-audio-osx/src/Makefile.am
+++ /dev/null
@@ -1,80 +0,0 @@
-#
-# Copyright 2006,2008,2009,2010 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio.
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-include $(top_srcdir)/Makefile.common
-include $(top_srcdir)/Makefile.swig
-
-TESTS =
-EXTRA_DIST += run_tests.in
-DISTCLEANFILES += run_tests
-
-AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
-
-# C/C++ headers get installed in ${prefix}/include/gnuradio
-grinclude_HEADERS = \
- audio_osx_sink.h \
- audio_osx_source.h
-
-noinst_HEADERS = \
- audio_osx.h \
- circular_buffer.h
-
-noinst_PYTHON = \
- qa_osx.py \
- test_audio_loop.py
-
-lib_LTLIBRARIES = libgnuradio-audio-osx.la
-
-libgnuradio_audio_osx_la_SOURCES = \
- audio_osx_sink.cc \
- audio_osx_source.cc
-
-libgnuradio_audio_osx_la_LIBADD = \
- $(GNURADIO_CORE_LA)
-
-libgnuradio_audio_osx_la_LDFLAGS = \
- -framework AudioUnit \
- -framework CoreAudio \
- -framework AudioToolbox \
- $(NO_UNDEFINED) \
- $(LTVERSIONFLAGS)
-
-###################################
-# SWIG interfaces and libraries
-
-TOP_SWIG_IFILES = \
- audio_osx.i
-
-# Install so that they end up available as:
-# import gnuradio.audio_osx
-# This ends up at:
-# ${prefix}/lib/python${python_version}/site-packages/gnuradio
-audio_osx_pythondir_category = \
- gnuradio
-
-# additional libraries for linking with the SWIG-generated library
-audio_osx_la_swig_libadd = \
- libgnuradio-audio-osx.la
-
-
-if PYTHON
-TESTS += run_tests
-endif \ No newline at end of file
diff --git a/gr-audio-osx/src/Makefile.swig.gen b/gr-audio-osx/src/Makefile.swig.gen
deleted file mode 100644
index 532433083..000000000
--- a/gr-audio-osx/src/Makefile.swig.gen
+++ /dev/null
@@ -1,145 +0,0 @@
-# -*- Makefile -*-
-#
-# Copyright 2009 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-# Makefile.swig.gen for audio_osx.i
-
-## Default install locations for these files:
-##
-## Default location for the Python directory is:
-## ${prefix}/lib/python${python_version}/site-packages/[category]/audio_osx
-## Default location for the Python exec directory is:
-## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/audio_osx
-##
-## The following can be overloaded to change the install location, but
-## this has to be done in the including Makefile.am -before-
-## Makefile.swig is included.
-
-audio_osx_pythondir_category ?= gnuradio/audio_osx
-audio_osx_pylibdir_category ?= $(audio_osx_pythondir_category)
-audio_osx_pythondir = $(pythondir)/$(audio_osx_pythondir_category)
-audio_osx_pylibdir = $(pyexecdir)/$(audio_osx_pylibdir_category)
-
-# The .so libraries for the guile modules get installed whereever guile
-# is installed, usually /usr/lib/guile/gnuradio/
-# FIXME: determince whether these should be installed with gnuradio.
-audio_osx_scmlibdir = $(libdir)
-
-# The scm files for the guile modules get installed where ever guile
-# is installed, usually /usr/share/guile/site/audio_osx
-# FIXME: determince whether these should be installed with gnuradio.
-audio_osx_scmdir = $(guiledir)
-
-## SWIG headers are always installed into the same directory.
-
-audio_osx_swigincludedir = $(swigincludedir)
-
-## This is a template file for a "generated" Makefile addition (in
-## this case, "Makefile.swig.gen"). By including the top-level
-## Makefile.swig, this file will be used to generate the SWIG
-## dependencies. Assign the variable TOP_SWIG_FILES to be the list of
-## SWIG .i files to generated wrappings for; there can be more than 1
-## so long as the names are unique (no sorting is done on the
-## TOP_SWIG_FILES list). This file explicitly assumes that a SWIG .i
-## file will generate .cc, .py, and possibly .h files -- meaning that
-## all of these files will have the same base name (that provided for
-## the SWIG .i file).
-##
-## This code is setup to ensure parallel MAKE ("-j" or "-jN") does the
-## right thing. For more info, see <
-## http://sources.redhat.com/automake/automake.html#Multiple-Outputs >
-
-## Other cleaned files: dependency files generated by SWIG or this Makefile
-
-MOSTLYCLEANFILES += $(DEPDIR)/*.S*
-
-## Various SWIG variables. These can be overloaded in the including
-## Makefile.am by setting the variable value there, then including
-## Makefile.swig .
-
-audio_osx_swiginclude_HEADERS = \
- audio_osx.i \
- $(audio_osx_swiginclude_headers)
-
-if PYTHON
-audio_osx_pylib_LTLIBRARIES = \
- _audio_osx.la
-
-_audio_osx_la_SOURCES = \
- python/audio_osx.cc \
- $(audio_osx_la_swig_sources)
-
-audio_osx_python_PYTHON = \
- audio_osx.py \
- $(audio_osx_python)
-
-_audio_osx_la_LIBADD = \
- $(STD_SWIG_LA_LIB_ADD) \
- $(audio_osx_la_swig_libadd)
-
-_audio_osx_la_LDFLAGS = \
- $(STD_SWIG_LA_LD_FLAGS) \
- $(audio_osx_la_swig_ldflags)
-
-_audio_osx_la_CXXFLAGS = \
- $(STD_SWIG_CXX_FLAGS) \
- -I$(top_builddir) \
- $(audio_osx_la_swig_cxxflags)
-
-python/audio_osx.cc: audio_osx.py
-audio_osx.py: audio_osx.i
-
-# Include the python dependencies for this file
--include python/audio_osx.d
-
-endif # end of if python
-
-if GUILE
-
-audio_osx_scmlib_LTLIBRARIES = \
- libguile-gnuradio-audio_osx.la
-libguile_gnuradio_audio_osx_la_SOURCES = \
- guile/audio_osx.cc \
- $(audio_osx_la_swig_sources)
-nobase_audio_osx_scm_DATA = \
- gnuradio/audio_osx.scm \
- gnuradio/audio_osx-primitive.scm
-libguile_gnuradio_audio_osx_la_LIBADD = \
- $(STD_SWIG_LA_LIB_ADD) \
- $(audio_osx_la_swig_libadd)
-libguile_gnuradio_audio_osx_la_LDFLAGS = \
- $(STD_SWIG_LA_LD_FLAGS) \
- $(audio_osx_la_swig_ldflags)
-libguile_gnuradio_audio_osx_la_CXXFLAGS = \
- $(STD_SWIG_CXX_FLAGS) \
- -I$(top_builddir) \
- $(audio_osx_la_swig_cxxflags)
-
-guile/audio_osx.cc: gnuradio/audio_osx.scm
-gnuradio/audio_osx.scm: audio_osx.i
-gnuradio/audio_osx-primitive.scm: gnuradio/audio_osx.scm
-
-# Include the guile dependencies for this file
--include guile/audio_osx.d
-
-endif # end of GUILE
-
-
diff --git a/gr-audio-osx/src/audio_osx.i b/gr-audio-osx/src/audio_osx.i
deleted file mode 100644
index a51e9bae0..000000000
--- a/gr-audio-osx/src/audio_osx.i
+++ /dev/null
@@ -1,100 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2006,2009 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio.
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-%include "gnuradio.i" // the common stuff
-
-%{
-#include "audio_osx_sink.h"
-#include "audio_osx_source.h"
-%}
-
-// ----------------------------------------------------------------
-
-GR_SWIG_BLOCK_MAGIC(audio_osx,sink)
-
-audio_osx_sink_sptr
-audio_osx_make_sink (int sample_rate = 44100,
- const std::string device_name = "2",
- bool do_block = TRUE,
- int channel_config = -1,
- int max_sample_count = -1
- ) throw (std::runtime_error);
-
-class audio_osx_sink : public gr_sync_block {
- protected:
- audio_osx_sink (int sample_rate = 44100,
- const std::string device_name = "2",
- bool do_block = TRUE,
- int channel_config = -1,
- int max_sample_count = -1);
-
- public:
- ~audio_osx_sink ();
-
- bool start ();
- bool stop ();
-
- int work (int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-};
-
-// ----------------------------------------------------------------
-
-GR_SWIG_BLOCK_MAGIC(audio_osx,source)
-
-audio_osx_source_sptr
-audio_osx_make_source (int sample_rate = 44100,
- const std::string device_name = "2",
- bool do_block = TRUE,
- int channel_config = -1,
- int max_sample_count = -1
- ) throw (std::runtime_error);
-
-class audio_osx_source : public gr_sync_block {
- protected:
- audio_osx_source (int sample_rate = 44100,
- const std::string device_name = "2",
- bool do_block = TRUE,
- int channel_config = -1,
- int max_sample_count = -1);
-
- public:
- ~audio_osx_source ();
-
- bool start ();
- bool stop ();
-
- int work (int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-};
-
-#if SWIGGUILE
-%scheme %{
-(load-extension-global "libguile-gnuradio-audio_osx" "scm_init_gnuradio_audio_osx_module")
-%}
-
-%goops %{
-(use-modules (gnuradio gnuradio_core_runtime))
-%}
-#endif
diff --git a/gr-audio-osx/src/circular_buffer.h b/gr-audio-osx/src/circular_buffer.h
deleted file mode 100644
index 48758bf87..000000000
--- a/gr-audio-osx/src/circular_buffer.h
+++ /dev/null
@@ -1,315 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2006,2009,2010 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio.
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef _CIRCULAR_BUFFER_H_
-#define _CIRCULAR_BUFFER_H_
-
-#include <gruel/thread.h>
-#include <iostream>
-#include <stdexcept>
-
-#ifndef DO_DEBUG
-#define DO_DEBUG 0
-#endif
-
-#if DO_DEBUG
-#define DEBUG(X) do{X} while(0);
-#else
-#define DEBUG(X) do{} while(0);
-#endif
-
-template <class T>
-class circular_buffer
-{
-private:
-// the buffer to use
- T* d_buffer;
-
-// the following are in Items (type T)
- size_t d_bufLen_I, d_readNdx_I, d_writeNdx_I;
- size_t d_n_avail_write_I, d_n_avail_read_I;
-
-// stuff to control access to class internals
- gruel::mutex* d_internal;
- gruel::condition_variable* d_readBlock;
- gruel::condition_variable* d_writeBlock;
-
-// booleans to decide how to control reading, writing, and aborting
- bool d_doWriteBlock, d_doFullRead, d_doAbort;
-
- void delete_mutex_cond () {
- if (d_internal) {
- delete d_internal;
- d_internal = NULL;
- }
- if (d_readBlock) {
- delete d_readBlock;
- d_readBlock = NULL;
- }
- if (d_writeBlock) {
- delete d_writeBlock;
- d_writeBlock = NULL;
- }
- };
-
-public:
- circular_buffer (size_t bufLen_I,
- bool doWriteBlock = true, bool doFullRead = false) {
- if (bufLen_I == 0)
- throw std::runtime_error ("circular_buffer(): "
- "Number of items to buffer must be > 0.\n");
- d_bufLen_I = bufLen_I;
- d_buffer = (T*) new T[d_bufLen_I];
- d_doWriteBlock = doWriteBlock;
- d_doFullRead = doFullRead;
- d_internal = NULL;
- d_readBlock = d_writeBlock = NULL;
- reset ();
- DEBUG (std::cerr << "c_b(): buf len (items) = " << d_bufLen_
- << ", doWriteBlock = " << (d_doWriteBlock ? "true" : "false")
- << ", doFullRead = " << (d_doFullRead ? "true" : "false")
- << std::endl);
- };
-
- ~circular_buffer () {
- delete_mutex_cond ();
- delete [] d_buffer;
- };
-
- inline size_t n_avail_write_items () {
- gruel::scoped_lock l (*d_internal);
- size_t retVal = d_n_avail_write_I;
- return (retVal);
- };
-
- inline size_t n_avail_read_items () {
- gruel::scoped_lock l (*d_internal);
- size_t retVal = d_n_avail_read_I;
- return (retVal);
- };
-
- inline size_t buffer_length_items () {return (d_bufLen_I);};
- inline bool do_write_block () {return (d_doWriteBlock);};
- inline bool do_full_read () {return (d_doFullRead);};
-
- void reset () {
- d_doAbort = false;
- bzero (d_buffer, d_bufLen_I * sizeof (T));
- d_readNdx_I = d_writeNdx_I = d_n_avail_read_I = 0;
- d_n_avail_write_I = d_bufLen_I;
- delete_mutex_cond ();
- // create a mutex to handle contention of shared resources;
- // any routine needed access to shared resources uses lock()
- // before doing anything, then unlock() when finished.
- d_internal = new gruel::mutex ();
- // link the internal mutex to the read and write conditions;
- // when wait() is called, the internal mutex will automatically
- // be unlock()'ed. Upon return (from a notify_one() to the condition),
- // the internal mutex will be lock()'ed.
- d_readBlock = new gruel::condition_variable ();
- d_writeBlock = new gruel::condition_variable ();
- };
-
-/*
- * enqueue: add the given buffer of item-length to the queue,
- * first-in-first-out (FIFO).
- *
- * inputs:
- * buf: a pointer to the buffer holding the data
- *
- * bufLen_I: the buffer length in items (of the instantiated type)
- *
- * returns:
- * -1: on overflow (write is not blocking, and data is being
- * written faster than it is being read)
- * 0: if nothing to do (0 length buffer)
- * 1: if success
- * 2: in the process of aborting, do doing nothing
- *
- * will throw runtime errors if inputs are improper:
- * buffer pointer is NULL
- * buffer length is larger than the instantiated buffer length
- */
-
- int enqueue (T* buf, size_t bufLen_I) {
- DEBUG (std::cerr << "enqueue: buf = " << (void*) buf
- << ", bufLen = " << bufLen_I
- << ", #av_wr = " << d_n_avail_write_I
- << ", #av_rd = " << d_n_avail_read_I << std::endl);
- if (bufLen_I > d_bufLen_I) {
- std::cerr << "ERROR: cannot add buffer longer ("
- << bufLen_I << ") than instantiated length ("
- << d_bufLen_I << ")." << std::endl;
- throw std::runtime_error ("circular_buffer::enqueue()");
- }
-
- if (bufLen_I == 0)
- return (0);
- if (!buf)
- throw std::runtime_error ("circular_buffer::enqueue(): "
- "input buffer is NULL.\n");
- gruel::scoped_lock l (*d_internal);
- if (d_doAbort) {
- return (2);
- }
- // set the return value to 1: success; change if needed
- int retval = 1;
- if (bufLen_I > d_n_avail_write_I) {
- if (d_doWriteBlock) {
- while (bufLen_I > d_n_avail_write_I) {
- DEBUG (std::cerr << "enqueue: #len > #a, waiting." << std::endl);
- // wait; will automatically unlock() the internal mutex via
- // the scoped lock
- d_writeBlock->wait (l);
- // and auto re-lock() it here.
- if (d_doAbort) {
- DEBUG (std::cerr << "enqueue: #len > #a, aborting." << std::endl);
- return (2);
- }
- DEBUG (std::cerr << "enqueue: #len > #a, done waiting." << std::endl);
- }
- } else {
- d_n_avail_read_I = d_bufLen_I - bufLen_I;
- d_n_avail_write_I = bufLen_I;
- DEBUG (std::cerr << "circular_buffer::enqueue: overflow" << std::endl);
- retval = -1;
- }
- }
- size_t n_now_I = d_bufLen_I - d_writeNdx_I, n_start_I = 0;
- if (n_now_I > bufLen_I)
- n_now_I = bufLen_I;
- else if (n_now_I < bufLen_I)
- n_start_I = bufLen_I - n_now_I;
- bcopy (buf, &(d_buffer[d_writeNdx_I]), n_now_I * sizeof (T));
- if (n_start_I) {
- bcopy (&(buf[n_now_I]), d_buffer, n_start_I * sizeof (T));
- d_writeNdx_I = n_start_I;
- } else
- d_writeNdx_I += n_now_I;
- d_n_avail_read_I += bufLen_I;
- d_n_avail_write_I -= bufLen_I;
- d_readBlock->notify_one ();
- return (retval);
- };
-
-/*
- * dequeue: removes from the queue the number of items requested, or
- * available, into the given buffer on a FIFO basis.
- *
- * inputs:
- * buf: a pointer to the buffer into which to copy the data
- *
- * bufLen_I: pointer to the number of items to remove in items
- * (of the instantiated type)
- *
- * returns:
- * 0: if nothing to do (0 length buffer)
- * 1: if success
- * 2: in the process of aborting, do doing nothing
- *
- * will throw runtime errors if inputs are improper:
- * buffer pointer is NULL
- * buffer length pointer is NULL
- * buffer length is larger than the instantiated buffer length
- */
-
- int dequeue (T* buf, size_t* bufLen_I) {
- DEBUG (std::cerr << "dequeue: buf = " << ((void*) buf)
- << ", *bufLen = " << (*bufLen_I)
- << ", #av_wr = " << d_n_avail_write_I
- << ", #av_rd = " << d_n_avail_read_I << std::endl);
- if (!bufLen_I)
- throw std::runtime_error ("circular_buffer::dequeue(): "
- "input bufLen pointer is NULL.\n");
- if (!buf)
- throw std::runtime_error ("circular_buffer::dequeue(): "
- "input buffer pointer is NULL.\n");
- size_t l_bufLen_I = *bufLen_I;
- if (l_bufLen_I == 0)
- return (0);
- if (l_bufLen_I > d_bufLen_I) {
- std::cerr << "ERROR: cannot remove buffer longer ("
- << l_bufLen_I << ") than instantiated length ("
- << d_bufLen_I << ")." << std::endl;
- throw std::runtime_error ("circular_buffer::dequeue()");
- }
-
- gruel::scoped_lock l (*d_internal);
- if (d_doAbort) {
- return (2);
- }
- if (d_doFullRead) {
- while (d_n_avail_read_I < l_bufLen_I) {
- DEBUG (std::cerr << "dequeue: #a < #len, waiting." << std::endl);
- // wait; will automatically unlock() the internal mutex via
- // the scoped lock
- d_readBlock->wait (l);
- // and re-lock() it here.
- if (d_doAbort) {
- DEBUG (std::cerr << "dequeue: #a < #len, aborting." << std::endl);
- return (2);
- }
- DEBUG (std::cerr << "dequeue: #a < #len, done waiting." << std::endl);
- }
- } else {
- while (d_n_avail_read_I == 0) {
- DEBUG (std::cerr << "dequeue: #a == 0, waiting." << std::endl);
- // wait; will automatically unlock() the internal mutex via
- // the scoped lock
- d_readBlock->wait (l);
- // and re-lock() it here.
- if (d_doAbort) {
- DEBUG (std::cerr << "dequeue: #a == 0, aborting." << std::endl);
- return (2);
- }
- DEBUG (std::cerr << "dequeue: #a == 0, done waiting." << std::endl);
- }
- }
- if (l_bufLen_I > d_n_avail_read_I)
- l_bufLen_I = d_n_avail_read_I;
- size_t n_now_I = d_bufLen_I - d_readNdx_I, n_start_I = 0;
- if (n_now_I > l_bufLen_I)
- n_now_I = l_bufLen_I;
- else if (n_now_I < l_bufLen_I)
- n_start_I = l_bufLen_I - n_now_I;
- bcopy (&(d_buffer[d_readNdx_I]), buf, n_now_I * sizeof (T));
- if (n_start_I) {
- bcopy (d_buffer, &(buf[n_now_I]), n_start_I * sizeof (T));
- d_readNdx_I = n_start_I;
- } else
- d_readNdx_I += n_now_I;
- *bufLen_I = l_bufLen_I;
- d_n_avail_read_I -= l_bufLen_I;
- d_n_avail_write_I += l_bufLen_I;
- d_writeBlock->notify_one ();
- return (1);
- };
-
- void abort () {
- gruel::scoped_lock l (*d_internal);
- d_doAbort = true;
- d_writeBlock->notify_one ();
- d_readBlock->notify_one ();
- };
-};
-
-#endif /* _CIRCULAR_BUFFER_H_ */
diff --git a/gr-audio-osx/src/qa_osx.py b/gr-audio-osx/src/qa_osx.py
deleted file mode 100755
index 385aa0269..000000000
--- a/gr-audio-osx/src/qa_osx.py
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2006,2007 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio.
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-from gnuradio import gr, gr_unittest
-import audio_osx
-
-class qa_osx (gr_unittest.TestCase):
-
- def setUp (self):
- self.tb = gr.top_block ()
-
- def tearDown (self):
- self.tb = None
-
- def test_000_nop (self):
- """Just see if we can import the module...
- They may not have OSX drivers, etc. Don't try to run anything"""
- pass
-
-if __name__ == '__main__':
- gr_unittest.main ()
diff --git a/gr-audio-osx/src/run_tests.in b/gr-audio-osx/src/run_tests.in
deleted file mode 100644
index d88c275e0..000000000
--- a/gr-audio-osx/src/run_tests.in
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-# 1st parameter is absolute path to component source directory
-# 2nd parameter is absolute path to component build directory
-# 3rd parameter is path to Python QA directory
-
-@top_builddir@/run_tests.sh \
- @abs_top_srcdir@/gr-audio-osx \
- @abs_top_builddir@/gr-audio-osx \
- @srcdir@
diff --git a/gr-audio-osx/src/test_audio_loop.py b/gr-audio-osx/src/test_audio_loop.py
deleted file mode 100755
index 662631dfb..000000000
--- a/gr-audio-osx/src/test_audio_loop.py
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2006,2007 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio.
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-from gnuradio import gr
-from gnuradio import audio
-from gnuradio.eng_option import eng_option
-from optparse import OptionParser
-
-class my_graph(gr.top_block):
-
- def __init__(self):
- gr.top_block.__init__(self)
-
- parser = OptionParser(option_class=eng_option)
- parser.add_option("-O", "--audio-output",
- type="string",
- default="",
- help="audio output device name. E.g., hw:0,0 or /dev/dsp")
- parser.add_option("-I", "--audio-input",
- type="string",
- default="",
- help="audio input 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 ()
- if len(args) != 0:
- parser.print_help()
- raise SystemExit, 1
-
- sample_rate = int(options.sample_rate)
- src = audio.source (sample_rate, options.audio_output)
- dst = audio.sink (sample_rate, options.audio_output)
-
- max_chan = max (src.output_signature().max_streams(),
- dst.output_signature().max_streams())
-
- for i in range (max_chan):
- self.connect ((src, i), (dst, i))
-
-if __name__ == '__main__':
- try:
- my_graph().run()
- except KeyboardInterrupt:
- pass
diff --git a/gr-audio-portaudio/.gitignore b/gr-audio-portaudio/.gitignore
deleted file mode 100644
index 53edad32f..000000000
--- a/gr-audio-portaudio/.gitignore
+++ /dev/null
@@ -1,32 +0,0 @@
-/*.cache
-/*.la
-/*.lo
-/*.pc
-/.deps
-/.la
-/.libs
-/.lo
-/Makefile
-/Makefile.in
-/aclocal.m4
-/autom4te.cache
-/config.cache
-/config.h
-/config.h.in
-/config.log
-/config.status
-/configure
-/depcomp
-/install-sh
-/libtool
-/ltmain.sh
-/make.log
-/missing
-/missing
-/mkinstalldirs
-/py-compile
-/stamp-h
-/stamp-h.in
-/stamp-h1
-/stamp-h1.in
-/stamp-h2.in
diff --git a/gr-audio-portaudio/README b/gr-audio-portaudio/README
deleted file mode 100644
index bd6fac643..000000000
--- a/gr-audio-portaudio/README
+++ /dev/null
@@ -1,99 +0,0 @@
-The instructions below are now obsolete. Please see:
-
-http://gnuradio.org/trac/wiki/PortAudioInstall
-
-======
-OBSOLETED
-
-These instructions are intended for Linux. On other systems you will have to
-construct something compatible to build gr-audio-portaudio.
-
-In order to use portaudio with gnuradio you will need to download and install
-a late version of portaudio. Please cd to a directory where the cvs command
-below will be allowed to build the portaudio directory tree.
-
-cvs -d:pserver:anonymous@www.portaudio.com:/home/cvs co -r v19-devel portaudio
-
-This will make a directory portaudio unless you already have one. It will
-check out the Portaudio API version 2 release 1.9.
-
-In the directory where this README is found, there is a patch file. Hopefully
-this patch will not be needed for long. Portaudio is working with us to use
-auto*, libtool, etc. The patch is autoconfiscate.patch.
-
-cd to the portaudio directory and run
-
-patch -p0 <autoconfiscate.patch
-
-this will modify the portaudio source tree to use standard tools and prepare
-it for use with gnuradio. Now run
-
-chmod u+x bootstrap
-
-you may need to edit bootstrap and remove the 2.50 at the end of some of the
-commands (on SUSE 10.0 for example).
-
-./bootstrap
-
-./configure --help
-
-
-will reveal the options for configure that are available to you. If you do not
-understand the options or wish to accept the defaults please just run
-
-./configure
-
-If you do not want the includes and libraries install in /usr/local (standard)
-then enter the prefix arguments to ./configure. This document will assume you
-are doing the standard installation and that will be into /usr/local.
-
-On Linux if you have the jack tool available from
-
-http://jackit.sourceforge.net
-
-the portaudio configure will enable the library to talk to jack.
-
-Now you are ready to make the portaudio library.
-
-make; sudo make install;sudo ldconfig (possibly /sbin/ldconfig).
-
-will make the code and install it into the prefix (/usr/local) selected and
-will cache the configuration information for other programs to use for their
-configuration options.
-
-Now you are ready to install gr-audio-portaudio. In the gr-build directory
-you may run
-
-cvs co gr-audio-portaudio
-
-cd gr-audio-portaudio
-../buildit
-
-will configure, make, and install the portaudio sink and source.
-
-In gnuradio-examples/python/audio please test by running
-
-./mono_tone_portaudio.py
-
-
-If this runs you are likely in business but this chooses the default device
-(typically /dev/dsp which is being run by alsa under oss emulation and on a
-Mac it will choose coreaudio).
-
-./mono_tone_portaudio.py -O hw:0,0
-
-chooses the default alsa device.
-
-./mono_tone_portaudio.py -O /dev/dsp
-
-will force the use of OSS and the default oss device. To run with jack, you
-will probably enter the following command:
-
-./mono_tone_portaudio.py -O alsa_pcm
-
-
-In the portaudio directory, you may list the devices visible to portaudio by
-searching for and running the command
-
-pa_devs
-
diff --git a/gr-audio-portaudio/autoconfiscate.patch b/gr-audio-portaudio/autoconfiscate.patch
deleted file mode 100755
index fd7b9c370..000000000
--- a/gr-audio-portaudio/autoconfiscate.patch
+++ /dev/null
@@ -1,1299 +0,0 @@
-Index: portaudio-2.0.pc.in
-===================================================================
-RCS file: /home/cvs/portaudio/Attic/portaudio-2.0.pc.in,v
-retrieving revision 1.1.2.1
-diff -u -b -B -w -p -r1.1.2.1 portaudio-2.0.pc.in
---- portaudio-2.0.pc.in 19 Mar 2006 13:02:36 -0000 1.1.2.1
-+++ portaudio-2.0.pc.in 19 Mar 2006 22:26:01 -0000
-@@ -9,4 +9,4 @@ Requires:
- Version: 19
-
- Libs: -L${libdir} -lportaudio @LIBS@
--Cflags: -I${includedir} @THREAD_CFLAGS@
-+Cflags: -I${includedir} @PTHREAD_CFLAGS@
-Index: pa_asio/iasiothiscallresolver.cpp
-===================================================================
-RCS file: /home/cvs/portaudio/pa_asio/Attic/iasiothiscallresolver.cpp,v
-retrieving revision 1.1.2.4
-diff -u -b -B -w -p -r1.1.2.4 iasiothiscallresolver.cpp
---- pa_asio/iasiothiscallresolver.cpp 10 Jul 2004 03:27:41 -0000 1.1.2.4
-+++ pa_asio/iasiothiscallresolver.cpp 19 Mar 2006 22:26:03 -0000
-@@ -152,6 +152,7 @@
- recent versions of the gcc assembler.
- */
-
-+#include <config.h>
-
- // We only need IASIOThiscallResolver at all if we are on Win32. For other
- // platforms we simply bypass the IASIOThiscallResolver definition to allow us
-Index: pa_asio/pa_asio.cpp
-===================================================================
-RCS file: /home/cvs/portaudio/pa_asio/pa_asio.cpp,v
-retrieving revision 1.7.2.68
-diff -u -b -B -w -p -r1.7.2.68 pa_asio.cpp
---- pa_asio/pa_asio.cpp 5 Dec 2005 04:55:28 -0000 1.7.2.68
-+++ pa_asio/pa_asio.cpp 19 Mar 2006 22:26:14 -0000
-@@ -106,7 +106,7 @@
- must be closed).
- */
-
--
-+#include <config.h>
-
- #include <stdio.h>
- #include <assert.h>
-Index: pa_common/pa_allocation.c
-===================================================================
-RCS file: /home/cvs/portaudio/pa_common/Attic/pa_allocation.c,v
-retrieving revision 1.1.2.6
-diff -u -b -B -w -p -r1.1.2.6 pa_allocation.c
---- pa_common/pa_allocation.c 20 Dec 2004 12:07:51 -0000 1.1.2.6
-+++ pa_common/pa_allocation.c 19 Mar 2006 22:26:15 -0000
-@@ -35,6 +35,8 @@
- */
-
-
-+#include <config.h>
-+
- #include "pa_allocation.h"
- #include "pa_util.h"
-
-Index: pa_common/pa_converters.c
-===================================================================
-RCS file: /home/cvs/portaudio/pa_common/Attic/pa_converters.c,v
-retrieving revision 1.1.2.27
-diff -u -b -B -w -p -r1.1.2.27 pa_converters.c
---- pa_common/pa_converters.c 2 Nov 2005 12:14:07 -0000 1.1.2.27
-+++ pa_common/pa_converters.c 19 Mar 2006 22:26:23 -0000
-@@ -49,6 +49,8 @@
- */
-
-
-+#include <config.h>
-+
- #include "pa_converters.h"
- #include "pa_dither.h"
- #include "pa_endianness.h"
-Index: pa_common/pa_cpuload.c
-===================================================================
-RCS file: /home/cvs/portaudio/pa_common/Attic/pa_cpuload.c,v
-retrieving revision 1.1.2.14
-diff -u -b -B -w -p -r1.1.2.14 pa_cpuload.c
---- pa_common/pa_cpuload.c 8 Jan 2004 22:01:12 -0000 1.1.2.14
-+++ pa_common/pa_cpuload.c 19 Mar 2006 22:26:24 -0000
-@@ -41,6 +41,8 @@
- */
-
-
-+#include <config.h>
-+
- #include "pa_cpuload.h"
-
- #include <assert.h>
-Index: pa_common/pa_dither.c
-===================================================================
-RCS file: /home/cvs/portaudio/pa_common/Attic/pa_dither.c,v
-retrieving revision 1.1.2.6
-diff -u -b -B -w -p -r1.1.2.6 pa_dither.c
---- pa_common/pa_dither.c 28 May 2005 22:49:02 -0000 1.1.2.6
-+++ pa_common/pa_dither.c 19 Mar 2006 22:26:24 -0000
-@@ -34,6 +34,8 @@
- */
-
-
-+#include <config.h>
-+
- #include "pa_dither.h"
- #include "pa_types.h"
-
-Index: pa_common/pa_front.c
-===================================================================
-RCS file: /home/cvs/portaudio/pa_common/Attic/pa_front.c,v
-retrieving revision 1.1.2.52
-diff -u -b -B -w -p -r1.1.2.52 pa_front.c
---- pa_common/pa_front.c 7 Dec 2005 20:10:34 -0000 1.1.2.52
-+++ pa_common/pa_front.c 19 Mar 2006 22:26:30 -0000
-@@ -89,6 +89,8 @@ enquire about status on the PortAudio ma
- */
-
-
-+#include <config.h>
-+
- #include <stdio.h>
- #include <stdarg.h>
- #include <memory.h>
-Index: pa_common/pa_process.c
-===================================================================
-RCS file: /home/cvs/portaudio/pa_common/Attic/pa_process.c,v
-retrieving revision 1.1.2.51
-diff -u -b -B -w -p -r1.1.2.51 pa_process.c
---- pa_common/pa_process.c 27 Oct 2005 23:28:48 -0000 1.1.2.51
-+++ pa_common/pa_process.c 19 Mar 2006 22:26:35 -0000
-@@ -72,6 +72,8 @@
- */
-
-
-+#include <config.h>
-+
- #include <assert.h>
- #include <string.h> /* memset() */
-
-Index: pa_common/pa_skeleton.c
-===================================================================
-RCS file: /home/cvs/portaudio/pa_common/Attic/pa_skeleton.c,v
-retrieving revision 1.1.2.39
-diff -u -b -B -w -p -r1.1.2.39 pa_skeleton.c
---- pa_common/pa_skeleton.c 26 Nov 2003 14:56:09 -0000 1.1.2.39
-+++ pa_common/pa_skeleton.c 19 Mar 2006 22:26:38 -0000
-@@ -40,6 +40,8 @@
- */
-
-
-+#include <config.h>
-+
- #include <string.h> /* strlen() */
-
- #include "pa_util.h"
-Index: pa_common/pa_stream.c
-===================================================================
-RCS file: /home/cvs/portaudio/pa_common/Attic/pa_stream.c,v
-retrieving revision 1.1.2.12
-diff -u -b -B -w -p -r1.1.2.12 pa_stream.c
---- pa_common/pa_stream.c 20 Sep 2003 21:31:00 -0000 1.1.2.12
-+++ pa_common/pa_stream.c 19 Mar 2006 22:26:39 -0000
-@@ -36,6 +36,8 @@
- */
-
-
-+#include <config.h>
-+
- #include "pa_stream.h"
-
-
-Index: pa_common/pa_trace.c
-===================================================================
-RCS file: /home/cvs/portaudio/pa_common/pa_trace.c,v
-retrieving revision 1.1.1.1.2.4
-diff -u -b -B -w -p -r1.1.1.1.2.4 pa_trace.c
---- pa_common/pa_trace.c 2 Nov 2005 12:06:44 -0000 1.1.1.1.2.4
-+++ pa_common/pa_trace.c 19 Mar 2006 22:26:39 -0000
-@@ -35,6 +35,8 @@
- */
-
-
-+#include <config.h>
-+
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-Index: pa_jack/pa_jack.c
-===================================================================
-RCS file: /home/cvs/portaudio/pa_jack/Attic/pa_jack.c,v
-retrieving revision 1.1.2.20
-diff -u -b -B -w -p -r1.1.2.20 pa_jack.c
---- pa_jack/pa_jack.c 2 Oct 2005 22:02:26 -0000 1.1.2.20
-+++ pa_jack/pa_jack.c 19 Mar 2006 22:26:46 -0000
-@@ -35,6 +35,8 @@
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-+#include <config.h>
-+
- #include <string.h>
- #include <regex.h>
- #include <stdlib.h>
-@@ -56,7 +58,7 @@
- #include "pa_process.h"
- #include "pa_allocation.h"
- #include "pa_cpuload.h"
--#include "../pablio/ringbuffer.c"
-+#include "pablio/ringbuffer.c"
-
- static int aErr_;
- static PaError paErr_; /* For use with ENSURE_PA */
-Index: pa_linux_alsa/pa_linux_alsa.c
-===================================================================
-RCS file: /home/cvs/portaudio/pa_linux_alsa/Attic/pa_linux_alsa.c,v
-retrieving revision 1.1.2.90
-diff -u -b -B -w -p -r1.1.2.90 pa_linux_alsa.c
---- pa_linux_alsa/pa_linux_alsa.c 19 Mar 2006 12:28:44 -0000 1.1.2.90
-+++ pa_linux_alsa/pa_linux_alsa.c 19 Mar 2006 22:27:00 -0000
-@@ -34,6 +34,8 @@
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-+#include <config.h>
-+
- #define ALSA_PCM_NEW_HW_PARAMS_API
- #define ALSA_PCM_NEW_SW_PARAMS_API
- #include <alsa/asoundlib.h>
-Index: pa_mac/pa_mac_hostapis.c
-===================================================================
-RCS file: /home/cvs/portaudio/pa_mac/Attic/pa_mac_hostapis.c,v
-retrieving revision 1.1.2.1
-diff -u -b -B -w -p -r1.1.2.1 pa_mac_hostapis.c
---- pa_mac/pa_mac_hostapis.c 27 May 2004 22:39:58 -0000 1.1.2.1
-+++ pa_mac/pa_mac_hostapis.c 19 Mar 2006 22:27:00 -0000
-@@ -33,6 +33,7 @@
- Mac OS host API initialization function table.
- */
-
-+#include <config.h>
-
- #include "pa_hostapi.h"
-
-Index: pa_mac_core/pa_mac_core.c
-===================================================================
-RCS file: /home/cvs/portaudio/pa_mac_core/pa_mac_core.c,v
-retrieving revision 1.8.2.11
-diff -u -b -B -w -p -r1.8.2.11 pa_mac_core.c
---- pa_mac_core/pa_mac_core.c 27 Feb 2006 14:25:50 -0000 1.8.2.11
-+++ pa_mac_core/pa_mac_core.c 19 Mar 2006 22:27:08 -0000
-@@ -45,6 +45,8 @@
- @brief AUHAL implementation of PortAudio
- */
-
-+#include <config.h>
-+
- #include <string.h> /* strlen(), memcmp() etc. */
-
- #include <AudioUnit/AudioUnit.h>
-Index: pa_mac_core/pa_mac_core_old.c
-===================================================================
-RCS file: /home/cvs/portaudio/pa_mac_core/Attic/pa_mac_core_old.c,v
-retrieving revision 1.1.2.1
-diff -u -b -B -w -p -r1.1.2.1 pa_mac_core_old.c
---- pa_mac_core/pa_mac_core_old.c 24 Dec 2005 01:22:52 -0000 1.1.2.1
-+++ pa_mac_core/pa_mac_core_old.c 19 Mar 2006 22:27:14 -0000
-@@ -34,6 +34,8 @@
- *
- */
-
-+#include <config.h>
-+
- #include <CoreAudio/CoreAudio.h>
- #include <AudioToolbox/AudioToolbox.h>
- #include <stdio.h>
-Index: pa_mac_core/pa_mac_core_utilities.c
-===================================================================
-RCS file: /home/cvs/portaudio/pa_mac_core/Attic/pa_mac_core_utilities.c,v
-retrieving revision 1.1.2.2
-diff -u -b -B -w -p -r1.1.2.2 pa_mac_core_utilities.c
---- pa_mac_core/pa_mac_core_utilities.c 9 Dec 2005 19:43:14 -0000 1.1.2.2
-+++ pa_mac_core/pa_mac_core_utilities.c 19 Mar 2006 22:27:14 -0000
-@@ -10,6 +10,8 @@
- * by Bjorn Roche.
- */
-
-+#include <config.h>
-+
- /*
- * Translates MacOS generated errors into PaErrors
- */
-Index: pa_mac_sm/pa_mac_sm.c
-===================================================================
-RCS file: /home/cvs/portaudio/pa_mac_sm/Attic/pa_mac_sm.c,v
-retrieving revision 1.1.2.1
-diff -u -b -B -w -p -r1.1.2.1 pa_mac_sm.c
---- pa_mac_sm/pa_mac_sm.c 7 Jun 2002 21:20:48 -0000 1.1.2.1
-+++ pa_mac_sm/pa_mac_sm.c 19 Mar 2006 22:27:21 -0000
-@@ -76,6 +76,8 @@ O- Add support for native sample data fo
- O- Review buffer sizing. Should it be based on result of siDeviceBufferInfo query?
- O- Determine default devices somehow.
- */
-+#include <config.h>
-+
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-Index: pa_sgi/pa_sgi.c
-===================================================================
-RCS file: /home/cvs/portaudio/pa_sgi/pa_sgi.c,v
-retrieving revision 1.2.2.20
-diff -u -b -B -w -p -r1.2.2.20 pa_sgi.c
---- pa_sgi/pa_sgi.c 3 Jan 2004 19:20:09 -0000 1.2.2.20
-+++ pa_sgi/pa_sgi.c 19 Mar 2006 22:27:27 -0000
-@@ -123,6 +123,8 @@
- a outputs stereo. One can observe this in SGI's 'Audio Queue Monitor'.
- */
-
-+#include <config.h>
-+
- #include <string.h> /* For strlen() but also for strerror()! */
- #include <stdio.h> /* printf() */
- #include <math.h> /* fabs() */
-Index: pa_unix/pa_unix_hostapis.c
-===================================================================
-RCS file: /home/cvs/portaudio/pa_unix/Attic/pa_unix_hostapis.c,v
-retrieving revision 1.1.2.5
-diff -u -b -B -w -p -r1.1.2.5 pa_unix_hostapis.c
---- pa_unix/pa_unix_hostapis.c 2 Oct 2003 12:35:46 -0000 1.1.2.5
-+++ pa_unix/pa_unix_hostapis.c 19 Mar 2006 22:27:28 -0000
-@@ -30,6 +30,8 @@
- */
-
-
-+#include <config.h>
-+
- #include "pa_hostapi.h"
-
- PaError PaJack_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
-Index: pa_unix/pa_unix_util.c
-===================================================================
-RCS file: /home/cvs/portaudio/pa_unix/Attic/pa_unix_util.c,v
-retrieving revision 1.1.2.8
-diff -u -b -B -w -p -r1.1.2.8 pa_unix_util.c
---- pa_unix/pa_unix_util.c 20 Nov 2005 13:46:13 -0000 1.1.2.8
-+++ pa_unix/pa_unix_util.c 19 Mar 2006 22:27:28 -0000
-@@ -31,6 +31,8 @@
- */
-
-
-+#include <config.h>
-+
- #include <pthread.h>
- #include <unistd.h>
- #include <stdlib.h>
-Index: pa_unix_oss/pa_unix_oss.c
-===================================================================
-RCS file: /home/cvs/portaudio/pa_unix_oss/pa_unix_oss.c,v
-retrieving revision 1.6.2.27
-diff -u -b -B -w -p -r1.6.2.27 pa_unix_oss.c
---- pa_unix_oss/pa_unix_oss.c 21 Feb 2006 19:13:56 -0000 1.6.2.27
-+++ pa_unix_oss/pa_unix_oss.c 19 Mar 2006 22:27:35 -0000
-@@ -35,6 +35,8 @@
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-+#include <config.h>
-+
- #include <stdio.h>
- #include <string.h>
- #include <math.h>
-@@ -42,7 +44,6 @@
- #include <sys/ioctl.h>
- #include <unistd.h>
- #include <pthread.h>
--#include <alloca.h>
- #include <malloc.h>
- #include <assert.h>
- #include <errno.h>
-@@ -52,14 +53,21 @@
- #include <limits.h>
- #include <semaphore.h>
-
--#ifdef __FreeBSD__
-+#ifdef HAVE_SYS_SOUNDCARD_H
- # include <sys/soundcard.h>
-+#elif HAVE_LINUX_SOUNDCARD_H
-+# include <linux/soundcard.h>
-+#elif HAVE_SOUNDCARD_H
-+# include <soundcard.h>
-+#else
-+# include <machine/soundcard.h> /* JH20010905 */
-+#endif
-+
-+#ifdef __FreeBSD__
- # define DEVICE_NAME_BASE "/dev/dsp"
- #elif defined __linux__
--# include <linux/soundcard.h>
- # define DEVICE_NAME_BASE "/dev/dsp"
- #else
--# include <machine/soundcard.h> /* JH20010905 */
- # define DEVICE_NAME_BASE "/dev/audio"
- #endif
-
-@@ -1913,7 +1921,12 @@ static signed long GetStreamWriteAvailab
- PaOssStream *stream = (PaOssStream*)s;
- int delay = 0;
-
-+/*
-+ * FIXME: SNDCTL_DSP_GETODELAY does not exist on NetBSD
-+ */
-+#ifdef SNDCTL_DSP_GETODELAY
- if( ioctl( stream->playback->fd, SNDCTL_DSP_GETODELAY, &delay ) < 0 )
-+#endif
- return paUnanticipatedHostError;
-
- return (PaOssStreamComponent_BufferSize( stream->playback ) - delay) / PaOssStreamComponent_FrameSize( stream->playback );
-Index: pa_unix_oss/recplay.c
-===================================================================
-RCS file: /home/cvs/portaudio/pa_unix_oss/recplay.c,v
-retrieving revision 1.1.1.1
-diff -u -b -B -w -p -r1.1.1.1 recplay.c
---- pa_unix_oss/recplay.c 22 Jan 2002 00:52:44 -0000 1.1.1.1
-+++ pa_unix_oss/recplay.c 19 Mar 2006 22:27:35 -0000
-@@ -4,6 +4,8 @@
- * Minimal record and playback test.
- *
- */
-+#include <config.h>
-+
- #include <stdio.h>
- #include <unistd.h>
- #include <stdlib.h>
-Index: pa_win/pa_win_hostapis.c
-===================================================================
-RCS file: /home/cvs/portaudio/pa_win/Attic/pa_win_hostapis.c,v
-retrieving revision 1.1.2.10
-diff -u -b -B -w -p -r1.1.2.10 pa_win_hostapis.c
---- pa_win/pa_win_hostapis.c 8 Sep 2004 17:31:37 -0000 1.1.2.10
-+++ pa_win/pa_win_hostapis.c 19 Mar 2006 22:27:36 -0000
-@@ -36,6 +36,7 @@
- the Unix version does, we should consider being consistent.
- */
-
-+#include <config.h>
-
- #include "pa_hostapi.h"
-
-Index: pa_win/pa_win_util.c
-===================================================================
-RCS file: /home/cvs/portaudio/pa_win/Attic/pa_win_util.c,v
-retrieving revision 1.1.2.7
-diff -u -b -B -w -p -r1.1.2.7 pa_win_util.c
---- pa_win/pa_win_util.c 15 Sep 2003 18:30:26 -0000 1.1.2.7
-+++ pa_win/pa_win_util.c 19 Mar 2006 22:27:36 -0000
-@@ -37,6 +37,9 @@
- bug. (see msdn kb Q274323).
- */
-
-+#include <config.h>
-+
-+
- #include <windows.h>
- #include <mmsystem.h> /* for timeGetTime() */
-
-Index: pa_win/pa_x86_plain_converters.c
-===================================================================
-RCS file: /home/cvs/portaudio/pa_win/Attic/pa_x86_plain_converters.c,v
-retrieving revision 1.1.2.2
-diff -u -b -B -w -p -r1.1.2.2 pa_x86_plain_converters.c
---- pa_win/pa_x86_plain_converters.c 28 Feb 2003 01:49:59 -0000 1.1.2.2
-+++ pa_win/pa_x86_plain_converters.c 19 Mar 2006 22:27:40 -0000
-@@ -1,3 +1,5 @@
-+#include <config.h>
-+
- #include "pa_x86_plain_converters.h"
-
- #include "pa_converters.h"
-Index: pa_win_ds/dsound_wrapper.c
-===================================================================
-RCS file: /home/cvs/portaudio/pa_win_ds/dsound_wrapper.c,v
-retrieving revision 1.1.1.1.2.11
-diff -u -b -B -w -p -r1.1.1.1.2.11 dsound_wrapper.c
---- pa_win_ds/dsound_wrapper.c 7 Sep 2003 13:04:53 -0000 1.1.1.1.2.11
-+++ pa_win_ds/dsound_wrapper.c 19 Mar 2006 22:27:43 -0000
-@@ -33,6 +33,8 @@
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-+#include <config.h>
-+
- #include <stdio.h>
- #include <stdlib.h>
- #include <math.h>
-Index: pa_win_ds/pa_win_ds.c
-===================================================================
-RCS file: /home/cvs/portaudio/pa_win_ds/Attic/pa_win_ds.c,v
-retrieving revision 1.1.2.51
-diff -u -b -B -w -p -r1.1.2.51 pa_win_ds.c
---- pa_win_ds/pa_win_ds.c 26 Jan 2006 01:13:18 -0000 1.1.2.51
-+++ pa_win_ds/pa_win_ds.c 19 Mar 2006 22:27:49 -0000
-@@ -58,6 +58,8 @@
- O- fix "patest_stop.c"
- */
-
-+#include <config.h>
-+
- #include <stdio.h>
- #include <string.h> /* strlen() */
-
-Index: pa_win_wdmks/pa_win_wdmks.c
-===================================================================
-RCS file: /home/cvs/portaudio/pa_win_wdmks/Attic/pa_win_wdmks.c,v
-retrieving revision 1.1.2.4
-diff -u -b -B -w -p -r1.1.2.4 pa_win_wdmks.c
---- pa_win_wdmks/pa_win_wdmks.c 19 Nov 2005 10:14:01 -0000 1.1.2.4
-+++ pa_win_wdmks/pa_win_wdmks.c 19 Mar 2006 22:28:00 -0000
-@@ -42,6 +42,8 @@
- of a device for the duration of active stream using those devices
- */
-
-+#include <config.h>
-+
- #include <stdio.h>
-
- /* Debugging/tracing support */
-Index: pa_win_wmme/pa_win_wmme.c
-===================================================================
-RCS file: /home/cvs/portaudio/pa_win_wmme/pa_win_wmme.c,v
-retrieving revision 1.6.2.88
-diff -u -b -B -w -p -r1.6.2.88 pa_win_wmme.c
---- pa_win_wmme/pa_win_wmme.c 16 Feb 2006 01:56:45 -0000 1.6.2.88
-+++ pa_win_wmme/pa_win_wmme.c 19 Mar 2006 22:28:14 -0000
-@@ -100,6 +100,8 @@ Non-critical stuff for the future:
- Events (when necessary) inside the ReadStream() and WriteStream() functions.
- */
-
-+#include <config.h>
-+
- #include <stdio.h>
- #include <stdlib.h>
- #include <math.h>
---- /dev/null 2006-03-10 00:02:48.821312048 +0100
-+++ Makefile.am 2006-03-19 22:49:42.000000000 +0100
-@@ -0,0 +1,215 @@
-+#
-+# PortAudio V19 Makefile.am
-+#
-+# Stéphane Fillod
-+#
-+
-+INCLUDES = -I$(top_srcdir)/pa_common
-+
-+COMMON_SRC = \
-+ pa_common/pa_allocation.c \
-+ pa_common/pa_converters.c \
-+ pa_common/pa_cpuload.c \
-+ pa_common/pa_dither.c \
-+ pa_common/pa_front.c \
-+ pa_common/pa_process.c \
-+ pa_common/pa_skeleton.c \
-+ pa_common/pa_stream.c \
-+ pa_common/pa_trace.c
-+
-+libportaudio_coreaudio_la_SOURCES = \
-+ pa_mac/pa_mac_hostapis.c \
-+ pa_mac_core/pa_mac_core.c
-+
-+libportaudio_mac_asio_la_SOURCES = \
-+ pa_asio/iasiothiscallresolver.cpp
-+libportaudio_mac_asio_la_LIBADD = @ASIO_OBJS@
-+
-+libportaudio_dsound_la_SOURCES = \
-+ pa_win_ds/pa_win_ds.c \
-+ pa_win_ds/dsound_wrapper.c \
-+ pa_win/pa_win_hostapis.c \
-+ pa_win/pa_win_util.c
-+
-+libportaudio_win_asio_la_SOURCES = \
-+ pa_asio/pa_asio.cpp \
-+ pa_win/pa_win_hostapis.c \
-+ pa_win/pa_win_util.c \
-+ pa_asio/iasiothiscallresolver.cpp
-+libportaudio_win_asio_la_LIBADD = @ASIO_OBJS@
-+
-+libportaudio_wdmks_la_SOURCES = \
-+ pa_win_wdmks/pa_win_wdmks.c \
-+ pa_win/pa_win_hostapis.c \
-+ pa_win/pa_win_util.c
-+
-+libportaudio_wmme_la_SOURCES = \
-+ pa_win_wmme/pa_win_wmme.c \
-+ pa_win/pa_win_hostapis.c \
-+ pa_win/pa_win_util.c
-+
-+libportaudio_sgi_la_SOURCES = \
-+ pa_sgi/pa_sgi.c
-+
-+libportaudio_alsa_la_SOURCES = \
-+ pa_linux_alsa/pa_linux_alsa.c
-+
-+libportaudio_jack_la_SOURCES = \
-+ pa_jack/pa_jack.c
-+
-+libportaudio_oss_la_SOURCES = \
-+ pa_unix_oss/pa_unix_oss.c
-+
-+libportaudio_unix_la_SOURCES = \
-+ pa_unix/pa_unix_hostapis.c \
-+ pa_unix/pa_unix_util.c
-+
-+EXTRA_LTLIBRARIES = \
-+ libportaudio-coreaudio.la \
-+ libportaudio-mac-asio.la \
-+ libportaudio-dsound.la \
-+ libportaudio-win-asio.la \
-+ libportaudio-wdmks.la \
-+ libportaudio-wmme.la \
-+ libportaudio-sgi.la \
-+ libportaudio-alsa.la \
-+ libportaudio-jack.la \
-+ libportaudio-oss.la \
-+ libportaudio-unix.la
-+
-+noinst_LTLIBRARIES = @PA_LIBADD@
-+lib_LTLIBRARIES = libportaudio.la
-+
-+
-+libportaudio_la_SOURCES = \
-+ $(COMMON_SRC)
-+
-+# -no-undefined is required by Win32 and MacOSX, should be harmless otherwise
-+libportaudio_la_LDFLAGS = $(WINLDFLAGS) -no-undefined -version-info @PA_ABI@:@PA_REV@:@PA_AGE@
-+libportaudio_la_CFLAGS = $(AM_CFLAGS)
-+libportaudio_la_LIBADD = @PA_LIBADD@ -lm
-+libportaudio_la_DEPENDENCIES = @PA_LIBADD@
-+
-+
-+noinst_HEADERS = \
-+ pa_asio/iasiothiscallresolver.h \
-+ pa_asio/pa_asio.h \
-+ pa_beos/PlaybackNode.h \
-+ pablio/pablio.h \
-+ pablio/ringbuffer.h \
-+ pa_common/pa_allocation.h \
-+ pa_common/pa_converters.h \
-+ pa_common/pa_cpuload.h \
-+ pa_common/pa_dither.h \
-+ pa_common/pa_endianness.h \
-+ pa_common/pa_hostapi.h \
-+ pa_common/pa_process.h \
-+ pa_common/pa_stream.h \
-+ pa_common/pa_trace.h \
-+ pa_common/pa_types.h \
-+ pa_common/pa_util.h \
-+ pa_dll_switch/PaDllEntry.h \
-+ pa_dll_switch/portaudio.h \
-+ pa_linux_alsa/pa_linux_alsa.h \
-+ pa_mac_core/pa_mac_core.h \
-+ pa_unix/pa_unix_util.h \
-+ pa_win_ds/dsound_wrapper.h \
-+ pa_win/pa_x86_plain_converters.h \
-+ pa_win_wmme/pa_win_wmme.h
-+
-+include_HEADERS = \
-+ pa_common/portaudio.h
-+
-+
-+TESTS = \
-+ pa_tests/paqa_errs \
-+ pa_tests/patest1 \
-+ pa_tests/patest_buffer \
-+ pa_tests/patest_callbackstop \
-+ pa_tests/patest_clip \
-+ pa_tests/patest_dither \
-+ pa_tests/patest_hang \
-+ pa_tests/patest_in_overflow \
-+ pa_tests/patest_latency \
-+ pa_tests/patest_leftright \
-+ pa_tests/patest_longsine \
-+ pa_tests/patest_many \
-+ pa_tests/patest_maxsines \
-+ pa_tests/patest_multi_sine \
-+ pa_tests/patest_out_underflow \
-+ pa_tests/patest_pink \
-+ pa_tests/patest_prime \
-+ pa_tests/patest_read_record \
-+ pa_tests/patest_record \
-+ pa_tests/patest_ringmix \
-+ pa_tests/patest_saw \
-+ pa_tests/patest_sine8 \
-+ pa_tests/patest_sine \
-+ pa_tests/patest_sine_formats \
-+ pa_tests/patest_sine_time \
-+ pa_tests/patest_start_stop \
-+ pa_tests/patest_stop \
-+ pa_tests/patest_sync \
-+ pa_tests/patest_toomanysines \
-+ pa_tests/patest_underflow \
-+ pa_tests/patest_wire \
-+ pa_tests/patest_write_sine \
-+ pa_tests/pa_devs \
-+ pa_tests/pa_fuzz \
-+ pa_tests/pa_minlat \
-+ pa_tests/paqa_devs
-+
-+check_PROGRAMS = $(TESTS)
-+
-+LDADD = libportaudio.la
-+
-+# Most of these don't compile yet. Put them in TESTS, above, if
-+# you want to try to compile them...
-+ALL_TESTS = \
-+ pa_tests/debug_convert \
-+ pa_tests/debug_dither_calc \
-+ pa_tests/debug_dual \
-+ pa_tests/debug_multi_in \
-+ pa_tests/debug_multi_out \
-+ pa_tests/debug_record \
-+ pa_tests/debug_record_reuse \
-+ pa_tests/debug_sine_amp \
-+ pa_tests/debug_sine \
-+ pa_tests/debug_sine_formats \
-+ pa_tests/debug_srate \
-+ pa_tests/debug_test1 \
-+ $(TESTS)
-+
-+pkgconfigdir = $(libdir)/pkgconfig
-+pkgconfig_DATA = portaudio-2.0.pc
-+
-+
-+SUBDIRS=
-+DIST_SUBDIRS=
-+
-+ACLOCAL_AMFLAGS = -I config
-+
-+doc: config.doxy
-+ doxygen config.doxy
-+
-+# pa_asio pa_beos pablio pa_common pa_dll_switch pa_jack pa_linux_alsa pa_mac pa_mac_core pa_mac_sm pa_sgi pa_tests pa_unix pa_unix_oss pa_win pa_win_ds pa_win_wdmks pa_win_wmme
-+
-+PABLIO = \
-+ pablio/pablio.def \
-+ pablio/README.txt \
-+ pablio/ringbuffer.h \
-+ pablio/test_rw_echo.c \
-+ pablio/test_w_saw.c \
-+ pablio/pablio.c \
-+ pablio/pablio.h \
-+ pablio/ringbuffer.c \
-+ pablio/test_rw.c \
-+ pablio/test_w_saw8.c
-+
-+EXTRA_DIST = \
-+ $(PABLIO) \
-+ config.doxy \
-+ LICENSE.txt \
-+ README.txt \
-+ portaudio-2.0.pc.in \
-+ V19-devel-readme.txt
---- /dev/null 2006-03-10 00:02:48.821312048 +0100
-+++ configure.ac 2006-03-19 22:49:13.000000000 +0100
-@@ -0,0 +1,278 @@
-+dnl
-+dnl portaudio V19 configure.ac script
-+dnl
-+dnl Stephane Fillod, Dominic Mazzoni, Arve Knudsen
-+dnl
-+
-+dnl Require autoconf >= 2.57
-+AC_PREREQ(2.57)
-+
-+dnl Init autoconf and make sure configure is being called
-+dnl from the right directory
-+AC_INIT([portaudio], [2.0cvs], [portaudio@techweb.rfa.org])
-+AC_CONFIG_SRCDIR([pa_common/portaudio.h])
-+AC_CONFIG_HEADERS(config.h)
-+AC_CANONICAL_TARGET([])
-+
-+dnl Automake Initialisation.
-+AM_INIT_AUTOMAKE(AC_PACKAGE_TARNAME, AC_PACKAGE_VERSION, -)
-+AM_MAINTAINER_MODE
-+
-+dnl Portaudio library interface version, see libtool(info), esp.
-+dnl node 6.3 "Updating version info"
-+PA_ABI=19
-+PA_REV=0
-+PA_AGE=0
-+AC_SUBST(PA_ABI)
-+AC_SUBST(PA_REV)
-+AC_SUBST(PA_AGE)
-+
-+
-+dnl Checks for programs.
-+
-+AC_PROG_CC
-+AC_PROG_CXX
-+AC_PROG_RANLIB
-+AC_PROG_INSTALL
-+AC_PROG_MAKE_SET
-+
-+AC_AIX
-+AC_ISC_POSIX
-+AC_MINIX
-+AM_PROG_CC_STDC
-+AC_PROG_GCC_TRADITIONAL
-+AC_C_CONST
-+AC_C_INLINE
-+
-+dnl Check for Mingw support
-+#GR_PWIN32
-+
-+dnl libtool Initialisation
-+AC_LIBTOOL_WIN32_DLL
-+AC_PROG_LIBTOOL
-+
-+ACX_PTHREAD
-+
-+dnl This must be one of the first tests we do or it will fail...
-+AC_C_BIGENDIAN
-+
-+dnl checks for various host APIs and arguments to configure that
-+dnl turn them on or off
-+
-+AC_CHECK_LIB(asound, snd_pcm_open, [have_alsa=yes], [have_alsa=no])
-+
-+
-+PKG_CHECK_MODULES(JACK, jack, [have_jack=yes], [have_jack=no])
-+PKG_CHECK_LIB(jack_client_new, [$JACK_LIBS], [$JACK_CFLAGS], [have_jack=yes], [have_jack=no])
-+
-+AC_CHECK_HEADERS([sys/soundcard.h linux/soundcard.h soundcard.h machine/soundcard.h])
-+AC_CHECK_HEADERS(sys/ioctl.h, [have_oss=yes], [have_oss=no])
-+
-+dnl sizeof checks: we will need a 16-bit and a 32-bit type
-+
-+AC_CHECK_SIZEOF(short)
-+AC_CHECK_SIZEOF(int)
-+AC_CHECK_SIZEOF(long)
-+
-+dnl Specify options
-+
-+AC_ARG_WITH(alsa,
-+ [ --with-alsa (default=yes)],
-+ [with_alsa=$withval], [with_alsa=$have_alsa])
-+
-+AC_ARG_WITH(jack,
-+ [ --with-jack (default=yes)],
-+ [with_jack=$withval], [with_jack=$have_jack])
-+
-+AC_ARG_WITH(oss,
-+ [ --with-oss (default=yes)],
-+ [with_oss=$withval], [with_oss=$have_oss])
-+
-+AC_ARG_WITH(winapi,
-+ [ --with-winapi ((wmme/directx/asio) default=wmme)],
-+ [with_winapi=$withval], [with_winapi="wmme"])
-+
-+dnl Mac API added for ASIO, can have other api's listed
-+AC_ARG_WITH(macapi,
-+ [ --with-macapi ((asio/core/sm) default=core)],
-+ [with_macapi=$withval], [with_macapi="core"])
-+
-+AC_ARG_WITH(asiodir,
-+ [ --with-asiodir (default=/usr/local/asiosdk2)],
-+ [with_asiodir=$withval], [with_asiodir="/usr/local/asiosdk2"])
-+
-+AC_ARG_WITH(dxdir,
-+ [ --with-dxdir (default=/usr/local/dx7sdk)],
-+ [with_dxdir=$withval], [with_dxdir="/usr/local/dx7sdk"])
-+
-+AC_ARG_ENABLE(debug-output,
-+ [ --enable-debug-output],
-+ [if test x$enableval != xno ; then
-+ AC_DEFINE(PA_ENABLE_DEBUG_OUTPUT,,[Enable debugging messages])
-+ fi
-+ ])
-+
-+dnl BSD configuration
-+AC_HAVE_LIBRARY(ossaudio)
-+
-+dnl Mac OS X configuration
-+
-+AC_CHECK_LIB(CoreAudio, OpenAComponent,
-+ [
-+ have_coreaudio=yes
-+ PA_LIBADD="$PA_LIBADD libportaudio-coreaudio.la"
-+ AC_DEFINE([PA_USE_COREAUDIO], [], [Define to use Mac OS X CoreAudio])
-+ #LIBS="-framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon"
-+ LIBS="-lCoreAudio -lAudioToolbox -lAudioUnit -lCarbon"
-+ ], have_coreaudio=no)
-+
-+ASIO_CFLAGS=""
-+ASIO_OBJS=""
-+
-+if [[ $with_asiodir ]] ; then
-+ ASIODIR="$with_asiodir"
-+fi
-+
-+if [[ $with_macapi = "asio" ]] ; then
-+ echo "ASIODIR: $ASIODIR"
-+ ASIO_CFLAGS="-Ipa_asio -I$ASIDIR/host/mac -I$ASIODIR/common"
-+ ASIO_OBJS=$ASIODIR/common/asio.o $ASIODIR/host/asiodrivers.o $ASIODIR/host/mac/asioshlib.o
-+ PA_LIBADD="$PA_LIBADD libportaudio-mac-asio.la"
-+fi
-+
-+if [[ $with_winapi = "asio" ]] ; then
-+ echo "ASIODIR: $ASIODIR"
-+ ASIO_CFLAGS="-ffast-math -fomit-frame-pointer -Ipa_asio -I$ASIDIR/host/pc -I$ASIODIR/common -I$ASIODIR/host -DPA_NO_WMME -DPA_NO_DS -DPA_NO_WDMKS -DWINDOWS"
-+ ASIO_OBJS=$ASIODIR/common/asio.o $ASIODIR/host/asiodrivers.o $ASIODIR/host/pc/asiolist.o
-+ LIBS="$LIBS -lwinmm -lole32 -luuid"
-+ PA_LIBADD="$PA_LIBADD libportaudio-win-asio.la"
-+fi
-+
-+
-+dnl MingW/Win configuration
-+
-+AC_TRY_LINK_LIB(dsound, [DSW_InitOutputBuffer(0,0,0,0);], [
-+ #include <windows.h>
-+ #include <DSound.h>
-+ ], [-I$DXDIR/include],
-+ [
-+ have_directx=yes
-+ DXDIR="$with_dxdir"
-+ echo "DXDIR: $DXDIR"
-+ # LDFLAGS -L./dx7sdk/lib ?
-+ LIBS="-lwinmm -ldsound -lole32"
-+ CFLAGS="$CFLAGS -I$DXDIR/include -DPA_NO_WMME -DPA_NO_ASIO -DPA_NO_WDMKS"
-+ PA_LIBADD="$PA_LIBADD libportaudio-dsound.la"
-+ ], have_directx=no)
-+
-+AC_TRY_LINK_LIB(kernel32, [DeviceIoControl(0,0,0,0,0,0,0,0);],[
-+ #include <windows.h>
-+ #include <winbase.h>
-+ #include <ks.h>
-+ ], [-I$DXDIR/include],
-+ [
-+ have_wdmks=yes
-+ DXDIR="$with_dxdir"
-+ echo "DXDIR: $DXDIR"
-+ # LDFLAGS -L./dx7sdk/lib ?
-+ LIBS="-lwinmm -luuid -lsetupapi -lole32"
-+ CFLAGS="$CFLAGS -I$DXDIR/include -DPA_NO_WMME -DPA_NO_DS -DPA_NO_ASIO"
-+ PA_LIBADD="$PA_LIBADD libportaudio-wdmks.la"
-+ ], have_wdmks=no)
-+
-+# WMME default ?
-+AC_TRY_LINK_LIB(winmm, [waveOutOpen(0,0,0,0,0,0);],[
-+ #include <windows.h>
-+ #include <mmsystem.h>
-+ ], [],
-+ [
-+ have_wmme=yes
-+ LIBS="-lwinmm -lole32 -luuid"
-+ CFLAGS="$CFLAGS -DPA_NO_DS -DPA_NO_ASIO -DPA_NO_WDMKS"
-+ PA_LIBADD="$PA_LIBADD libportaudio-wmme.la"
-+ ], have_wmme=no)
-+
-+
-+dnl Unix configuration
-+
-+dnl SGI IRIX audio library (AL) configuration (Pieter, oct 2-13, 2003).
-+dnl The 'dmedia' library is needed to read the Unadjusted System Time (UST).
-+dnl
-+
-+AC_CHECK_LIB(audio, alOpenPort, [have_AL=1], [have_AL=0])
-+AC_CHECK_LIB(dmedia, dmGetUST, [have_dmedia=1], [have_dmedia=0])
-+
-+
-+if [[ $have_AL = "yes" ] && [ $have_dmedia = "yes" ]] ; then
-+ dnl See the '#ifdef PA_USE_SGI' in file pa_unix/pa_unix_hostapis.c
-+ dnl which selects the appropriate PaXXX_Initialize() function.
-+ dnl
-+
-+ LIBS="-ldmedia -laudio"
-+ AC_DEFINE([PA_USE_SGI], [], [Define to use special SGI system support])
-+ PA_LIBADD="$PA_LIBADD libportaudio-sgi.la"
-+
-+ # TODO:
-+ #AC_MSG_ERROR([IRIX audio library not found!])
-+ #AC_MSG_ERROR([IRIX digital media library not found!])
-+fi
-+
-+
-+if [[ $have_alsa = "yes" ] && [ $with_alsa != "no" ]] ; then
-+ LIBS="$LIBS -lasound"
-+ AC_DEFINE([PA_USE_ALSA], [], [Define to use ALSA])
-+ PA_LIBADD="$PA_LIBADD libportaudio-alsa.la"
-+fi
-+
-+if [[ $have_jack = "yes" ] && [ $with_jack != "no" ]] ; then
-+ LIBS="$LIBS $JACK_LIBS"
-+ CFLAGS="$CFLAGS $JACK_CFLAGS"
-+ AC_DEFINE([PA_USE_JACK], [], [Define to use JACK])
-+ PA_LIBADD="$PA_LIBADD libportaudio-jack.la"
-+fi
-+
-+if [[ $with_oss != "no" ]] ; then
-+ AC_DEFINE([PA_USE_OSS], [], [Define to use Open Sound System])
-+ PA_LIBADD="$PA_LIBADD libportaudio-oss.la"
-+fi
-+
-+dnl SGI books say -lpthread should be the last of the libs mentioned.
-+if [[ $acx_pthread_ok = "yes" ]] ; then
-+ LIBS="$LIBS $PTHREAD_LIBS"
-+ PA_LIBADD="$PA_LIBADD libportaudio-unix.la"
-+else
-+ if [[ $with_winapi != "wmme" -a $with_winapi != "directx" -a $with_winapi != "asio" ]] ; then
-+ AC_MSG_ERROR([libpthread not found!])
-+ fi
-+fi
-+
-+
-+if [[ $with_macapi = "asio" ] || [ $with_winapi = "asio" ]] ; then
-+ echo "ASIODIR: $ASIODIR"
-+
-+ CFLAGS="$CFLAGS $ASIO_CFLAGS"
-+fi
-+
-+if [[ $ac_cv_c_bigendian = "yes" ]] ; then
-+ CFLAGS="$CFLAGS -DPA_BIG_ENDIAN"
-+else
-+ CFLAGS="$CFLAGS -DPA_LITTLE_ENDIAN"
-+fi
-+
-+
-+CXXFLAGS="$CXXFLAGS"
-+
-+#CFLAGS="-g -O2 -Wall -pedantic -pipe"
-+
-+CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-+
-+
-+dnl extra variables
-+AC_SUBST(PA_LIBADD)
-+AC_SUBST(ASIO_OBJS)
-+AC_SUBST(PTHREAD_CFLAGS)
-+AC_SUBST(CXXFLAGS)
-+AC_SUBST(NASM)
-+AC_SUBST(NASMOPT)
-+
-+AC_OUTPUT([Makefile portaudio-2.0.pc])
---- /dev/null 2006-03-10 00:02:48.821312048 +0100
-+++ config/acx_pthread.m4 2006-03-17 15:41:05.000000000 +0100
-@@ -0,0 +1,190 @@
-+dnl Available from the GNU Autoconf Macro Archive at:
-+dnl http://www.gnu.org/software/ac-archive/htmldoc/acx_pthread.html
-+dnl
-+AC_DEFUN([ACX_PTHREAD], [
-+AC_REQUIRE([AC_CANONICAL_HOST])
-+AC_LANG_SAVE
-+AC_LANG_C
-+acx_pthread_ok=no
-+
-+# We used to check for pthread.h first, but this fails if pthread.h
-+# requires special compiler flags (e.g. on True64 or Sequent).
-+# It gets checked for in the link test anyway.
-+
-+# First of all, check if the user has set any of the PTHREAD_LIBS,
-+# etcetera environment variables, and if threads linking works using
-+# them:
-+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
-+ save_CFLAGS="$CFLAGS"
-+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-+ save_LIBS="$LIBS"
-+ LIBS="$PTHREAD_LIBS $LIBS"
-+ AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
-+ AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
-+ AC_MSG_RESULT($acx_pthread_ok)
-+ if test x"$acx_pthread_ok" = xno; then
-+ PTHREAD_LIBS=""
-+ PTHREAD_CFLAGS=""
-+ fi
-+ LIBS="$save_LIBS"
-+ CFLAGS="$save_CFLAGS"
-+fi
-+
-+# We must check for the threads library under a number of different
-+# names; the ordering is very important because some systems
-+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
-+# libraries is broken (non-POSIX).
-+
-+# Create a list of thread flags to try. Items starting with a "-" are
-+# C compiler flags, and other items are library names, except for "none"
-+# which indicates that we try without any flags at all.
-+
-+acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt"
-+
-+# The ordering *is* (sometimes) important. Some notes on the
-+# individual items follow:
-+
-+# pthreads: AIX (must check this before -lpthread)
-+# none: in case threads are in libc; should be tried before -Kthread and
-+# other compiler flags to prevent continual compiler warnings
-+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
-+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
-+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
-+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
-+# -pthreads: Solaris/gcc
-+# -mthreads: Mingw32/gcc, Lynx/gcc
-+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
-+# doesn't hurt to check since this sometimes defines pthreads too;
-+# also defines -D_REENTRANT)
-+# pthread: Linux, etcetera
-+# --thread-safe: KAI C++
-+
-+case "${host_cpu}-${host_os}" in
-+ *solaris*)
-+
-+ # On Solaris (at least, for some versions), libc contains stubbed
-+ # (non-functional) versions of the pthreads routines, so link-based
-+ # tests will erroneously succeed. (We need to link with -pthread or
-+ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
-+ # a function called by this macro, so we could check for that, but
-+ # who knows whether they'll stub that too in a future libc.) So,
-+ # we'll just look for -pthreads and -lpthread first:
-+
-+ acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
-+ ;;
-+esac
-+
-+if test x"$acx_pthread_ok" = xno; then
-+for flag in $acx_pthread_flags; do
-+
-+ case $flag in
-+ none)
-+ AC_MSG_CHECKING([whether pthreads work without any flags])
-+ ;;
-+
-+ -*)
-+ AC_MSG_CHECKING([whether pthreads work with $flag])
-+ PTHREAD_CFLAGS="$flag"
-+ ;;
-+
-+ *)
-+ AC_MSG_CHECKING([for the pthreads library -l$flag])
-+ PTHREAD_LIBS="-l$flag"
-+ ;;
-+ esac
-+
-+ save_LIBS="$LIBS"
-+ save_CFLAGS="$CFLAGS"
-+ LIBS="$PTHREAD_LIBS $LIBS"
-+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-+
-+ # Check for various functions. We must include pthread.h,
-+ # since some functions may be macros. (On the Sequent, we
-+ # need a special flag -Kthread to make this header compile.)
-+ # We check for pthread_join because it is in -lpthread on IRIX
-+ # while pthread_create is in libc. We check for pthread_attr_init
-+ # due to DEC craziness with -lpthreads. We check for
-+ # pthread_cleanup_push because it is one of the few pthread
-+ # functions on Solaris that doesn't have a non-functional libc stub.
-+ # We try pthread_create on general principles.
-+ AC_TRY_LINK([#include <pthread.h>],
-+ [pthread_t th; pthread_join(th, 0);
-+ pthread_attr_init(0); pthread_cleanup_push(0, 0);
-+ pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
-+ [acx_pthread_ok=yes])
-+
-+ LIBS="$save_LIBS"
-+ CFLAGS="$save_CFLAGS"
-+
-+ AC_MSG_RESULT($acx_pthread_ok)
-+ if test "x$acx_pthread_ok" = xyes; then
-+ break;
-+ fi
-+
-+ PTHREAD_LIBS=""
-+ PTHREAD_CFLAGS=""
-+done
-+fi
-+
-+# Various other checks:
-+if test "x$acx_pthread_ok" = xyes; then
-+ save_LIBS="$LIBS"
-+ LIBS="$PTHREAD_LIBS $LIBS"
-+ save_CFLAGS="$CFLAGS"
-+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-+
-+ # Detect AIX lossage: threads are created detached by default
-+ # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
-+ AC_MSG_CHECKING([for joinable pthread attribute])
-+ AC_TRY_LINK([#include <pthread.h>],
-+ [int attr=PTHREAD_CREATE_JOINABLE;],
-+ ok=PTHREAD_CREATE_JOINABLE, ok=unknown)
-+ if test x"$ok" = xunknown; then
-+ AC_TRY_LINK([#include <pthread.h>],
-+ [int attr=PTHREAD_CREATE_UNDETACHED;],
-+ ok=PTHREAD_CREATE_UNDETACHED, ok=unknown)
-+ fi
-+ if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
-+ AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok,
-+ [Define to the necessary symbol if this constant
-+ uses a non-standard name on your system.])
-+ fi
-+ AC_MSG_RESULT(${ok})
-+ if test x"$ok" = xunknown; then
-+ AC_MSG_WARN([we do not know how to create joinable pthreads])
-+ fi
-+
-+ AC_MSG_CHECKING([if more special flags are required for pthreads])
-+ flag=no
-+ case "${host_cpu}-${host_os}" in
-+ *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";;
-+ *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
-+ esac
-+ AC_MSG_RESULT(${flag})
-+ if test "x$flag" != xno; then
-+ PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
-+ fi
-+
-+ LIBS="$save_LIBS"
-+ CFLAGS="$save_CFLAGS"
-+
-+ # More AIX lossage: must compile with cc_r
-+ AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
-+else
-+ PTHREAD_CC="$CC"
-+fi
-+
-+AC_SUBST(PTHREAD_LIBS)
-+AC_SUBST(PTHREAD_CFLAGS)
-+AC_SUBST(PTHREAD_CC)
-+
-+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-+if test x"$acx_pthread_ok" = xyes; then
-+ ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
-+ :
-+else
-+ acx_pthread_ok=no
-+ $2
-+fi
-+AC_LANG_RESTORE
-+])dnl ACX_PTHREAD
---- /dev/null 2006-03-10 00:02:48.821312048 +0100
-+++ config/pkg_check.m4 2006-03-17 22:12:37.000000000 +0100
-@@ -0,0 +1,49 @@
-+
-+AC_DEFUN([PKG_CHECK_LIB], [
-+AC_REQUIRE([AC_CANONICAL_HOST])
-+AC_LANG_SAVE
-+AC_LANG_C
-+
-+ save_CFLAGS="$CFLAGS"
-+ CFLAGS="$CFLAGS $3"
-+ save_LIBS="$LIBS"
-+ LIBS="$2 $LIBS"
-+ AC_MSG_CHECKING([for $1 in LIBS=$2 with CFLAGS=$3])
-+ AC_TRY_LINK_FUNC([$1], pkg_check_try_link=yes, pkg_check_try_link=no)
-+ AC_MSG_RESULT($pkg_check_try_link)
-+ LIBS="$save_LIBS"
-+ CFLAGS="$save_CFLAGS"
-+
-+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-+if test x"$pkg_check_try_link" = xyes; then
-+ $4
-+else
-+ $5
-+fi
-+AC_LANG_RESTORE
-+])dnl PKG_CHECK_LIB
-+
-+
-+AC_DEFUN([AC_TRY_LINK_LIB], [
-+AC_REQUIRE([AC_CANONICAL_HOST])
-+AC_LANG_SAVE
-+AC_LANG_C
-+
-+ save_CFLAGS="$CFLAGS"
-+ CFLAGS="$CFLAGS $4"
-+ save_LIBS="$LIBS"
-+ LIBS="-l$1 $LIBS"
-+ AC_MSG_CHECKING([for $2 in $1])
-+ AC_TRY_LINK([$3], [$2], ac_try_link_lib=yes, ac_try_link_lib=no)
-+ AC_MSG_RESULT($ac_try_link_lib)
-+ LIBS="$save_LIBS"
-+ CFLAGS="$save_CFLAGS"
-+
-+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-+if test x"$ac_try_link_lib" = xyes; then
-+ $5
-+else
-+ $6
-+fi
-+AC_LANG_RESTORE
-+])dnl AC_TRY_LINK_LIB
---- /dev/null 2006-03-10 00:02:48.821312048 +0100
-+++ bootstrap 2006-03-19 23:33:58.000000000 +0100
-@@ -0,0 +1,9 @@
-+#!/bin/sh
-+
-+rm -rf config.cache autom4te*.cache
-+
-+aclocal-1.9 -I config
-+autoconf2.50
-+autoheader2.50
-+libtoolize --automake
-+automake-1.9 --add-missing --foreign
diff --git a/gr-audio-portaudio/gnuradio-audio-portaudio.pc.in b/gr-audio-portaudio/gnuradio-audio-portaudio.pc.in
deleted file mode 100644
index 086195965..000000000
--- a/gr-audio-portaudio/gnuradio-audio-portaudio.pc.in
+++ /dev/null
@@ -1,11 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: gnuradio-audio-portaudio
-Description: The GNU Radio block for the PORTAUDIO sound system
-Requires: gnuradio-core
-Version: @LIBVER@
-Libs: -L${libdir} -lgnuradio-audio-portaudio
-Cflags: -I${includedir}
diff --git a/gr-audio-portaudio/src/.gitignore b/gr-audio-portaudio/src/.gitignore
deleted file mode 100644
index f05e85127..000000000
--- a/gr-audio-portaudio/src/.gitignore
+++ /dev/null
@@ -1,20 +0,0 @@
-/Makefile
-/Makefile.in
-/.la
-/.lo
-/.deps
-/.libs
-/*.la
-/*.lo
-/*.pyc
-/*.pyo
-/usrp.py
-/usrp.cc
-/audio_oss.cc
-/audio_oss.py
-/audio_portaudio.py
-/audio_portaudio.cc
-/run_tests
-/gnuradio
-/guile
-/python
diff --git a/gr-audio-portaudio/src/Makefile.am b/gr-audio-portaudio/src/Makefile.am
deleted file mode 100644
index f8d42792b..000000000
--- a/gr-audio-portaudio/src/Makefile.am
+++ /dev/null
@@ -1,77 +0,0 @@
-#
-# Copyright 2004,2008,2009,2010 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-include $(top_srcdir)/Makefile.common
-include $(top_srcdir)/Makefile.swig
-
-TESTS =
-EXTRA_DIST += run_tests.in
-DISTCLEANFILES += run_tests
-
-AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) \
- $(PORTAUDIO_CFLAGS) $(WITH_INCLUDES)
-
-# C/C++ headers get installed in ${prefix}/include/gnuradio
-grinclude_HEADERS = \
- audio_portaudio_sink.h \
- audio_portaudio_source.h
-
-noinst_HEADERS = \
- gri_portaudio.h
-
-noinst_PYTHON = \
- qa_portaudio.py
-
-lib_LTLIBRARIES = libgnuradio-audio-portaudio.la
-
-libgnuradio_audio_portaudio_la_SOURCES = \
- audio_portaudio_sink.cc \
- audio_portaudio_source.cc \
- gri_portaudio.cc
-
-libgnuradio_audio_portaudio_la_LIBADD = \
- $(GNURADIO_CORE_LA) \
- $(PORTAUDIO_LIBS)
-
-libgnuradio_audio_portaudio_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS)
-
-
-###################################
-# SWIG interfaces and libraries
-
-TOP_SWIG_IFILES = \
- audio_portaudio.i
-
-# Install so that they end up available as:
-# import gnuradio.audio_portaudio
-# This ends up at:
-# ${prefix}/lib/python${python_version}/site-packages/gnuradio
-audio_portaudio_pythondir_category = \
- gnuradio
-
-# additional libraries for linking with the SWIG-generated library
-audio_portaudio_la_swig_libadd = \
- libgnuradio-audio-portaudio.la
-
-
-if PYTHON
-TESTS += run_tests
-endif \ No newline at end of file
diff --git a/gr-audio-portaudio/src/Makefile.swig.gen b/gr-audio-portaudio/src/Makefile.swig.gen
deleted file mode 100644
index 32c2e54e1..000000000
--- a/gr-audio-portaudio/src/Makefile.swig.gen
+++ /dev/null
@@ -1,145 +0,0 @@
-# -*- Makefile -*-
-#
-# Copyright 2009 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-# Makefile.swig.gen for audio_portaudio.i
-
-## Default install locations for these files:
-##
-## Default location for the Python directory is:
-## ${prefix}/lib/python${python_version}/site-packages/[category]/audio_portaudio
-## Default location for the Python exec directory is:
-## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/audio_portaudio
-##
-## The following can be overloaded to change the install location, but
-## this has to be done in the including Makefile.am -before-
-## Makefile.swig is included.
-
-audio_portaudio_pythondir_category ?= gnuradio/audio_portaudio
-audio_portaudio_pylibdir_category ?= $(audio_portaudio_pythondir_category)
-audio_portaudio_pythondir = $(pythondir)/$(audio_portaudio_pythondir_category)
-audio_portaudio_pylibdir = $(pyexecdir)/$(audio_portaudio_pylibdir_category)
-
-# The .so libraries for the guile modules get installed whereever guile
-# is installed, usually /usr/lib/guile/gnuradio/
-# FIXME: determince whether these should be installed with gnuradio.
-audio_portaudio_scmlibdir = $(libdir)
-
-# The scm files for the guile modules get installed where ever guile
-# is installed, usually /usr/share/guile/site/audio_portaudio
-# FIXME: determince whether these should be installed with gnuradio.
-audio_portaudio_scmdir = $(guiledir)
-
-## SWIG headers are always installed into the same directory.
-
-audio_portaudio_swigincludedir = $(swigincludedir)
-
-## This is a template file for a "generated" Makefile addition (in
-## this case, "Makefile.swig.gen"). By including the top-level
-## Makefile.swig, this file will be used to generate the SWIG
-## dependencies. Assign the variable TOP_SWIG_FILES to be the list of
-## SWIG .i files to generated wrappings for; there can be more than 1
-## so long as the names are unique (no sorting is done on the
-## TOP_SWIG_FILES list). This file explicitly assumes that a SWIG .i
-## file will generate .cc, .py, and possibly .h files -- meaning that
-## all of these files will have the same base name (that provided for
-## the SWIG .i file).
-##
-## This code is setup to ensure parallel MAKE ("-j" or "-jN") does the
-## right thing. For more info, see <
-## http://sources.redhat.com/automake/automake.html#Multiple-Outputs >
-
-## Other cleaned files: dependency files generated by SWIG or this Makefile
-
-MOSTLYCLEANFILES += $(DEPDIR)/*.S*
-
-## Various SWIG variables. These can be overloaded in the including
-## Makefile.am by setting the variable value there, then including
-## Makefile.swig .
-
-audio_portaudio_swiginclude_HEADERS = \
- audio_portaudio.i \
- $(audio_portaudio_swiginclude_headers)
-
-if PYTHON
-audio_portaudio_pylib_LTLIBRARIES = \
- _audio_portaudio.la
-
-_audio_portaudio_la_SOURCES = \
- python/audio_portaudio.cc \
- $(audio_portaudio_la_swig_sources)
-
-audio_portaudio_python_PYTHON = \
- audio_portaudio.py \
- $(audio_portaudio_python)
-
-_audio_portaudio_la_LIBADD = \
- $(STD_SWIG_LA_LIB_ADD) \
- $(audio_portaudio_la_swig_libadd)
-
-_audio_portaudio_la_LDFLAGS = \
- $(STD_SWIG_LA_LD_FLAGS) \
- $(audio_portaudio_la_swig_ldflags)
-
-_audio_portaudio_la_CXXFLAGS = \
- $(STD_SWIG_CXX_FLAGS) \
- -I$(top_builddir) \
- $(audio_portaudio_la_swig_cxxflags)
-
-python/audio_portaudio.cc: audio_portaudio.py
-audio_portaudio.py: audio_portaudio.i
-
-# Include the python dependencies for this file
--include python/audio_portaudio.d
-
-endif # end of if python
-
-if GUILE
-
-audio_portaudio_scmlib_LTLIBRARIES = \
- libguile-gnuradio-audio_portaudio.la
-libguile_gnuradio_audio_portaudio_la_SOURCES = \
- guile/audio_portaudio.cc \
- $(audio_portaudio_la_swig_sources)
-nobase_audio_portaudio_scm_DATA = \
- gnuradio/audio_portaudio.scm \
- gnuradio/audio_portaudio-primitive.scm
-libguile_gnuradio_audio_portaudio_la_LIBADD = \
- $(STD_SWIG_LA_LIB_ADD) \
- $(audio_portaudio_la_swig_libadd)
-libguile_gnuradio_audio_portaudio_la_LDFLAGS = \
- $(STD_SWIG_LA_LD_FLAGS) \
- $(audio_portaudio_la_swig_ldflags)
-libguile_gnuradio_audio_portaudio_la_CXXFLAGS = \
- $(STD_SWIG_CXX_FLAGS) \
- -I$(top_builddir) \
- $(audio_portaudio_la_swig_cxxflags)
-
-guile/audio_portaudio.cc: gnuradio/audio_portaudio.scm
-gnuradio/audio_portaudio.scm: audio_portaudio.i
-gnuradio/audio_portaudio-primitive.scm: gnuradio/audio_portaudio.scm
-
-# Include the guile dependencies for this file
--include guile/audio_portaudio.d
-
-endif # end of GUILE
-
-
diff --git a/gr-audio-portaudio/src/audio_portaudio.i b/gr-audio-portaudio/src/audio_portaudio.i
deleted file mode 100644
index 612b0afff..000000000
--- a/gr-audio-portaudio/src/audio_portaudio.i
+++ /dev/null
@@ -1,82 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2009 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-%include "gnuradio.i" // the common stuff
-
-%{
-#include "audio_portaudio_sink.h"
-#include "audio_portaudio_source.h"
-%}
-
-// ----------------------------------------------------------------
-
-GR_SWIG_BLOCK_MAGIC(audio_portaudio,source)
-
-audio_portaudio_source_sptr
-audio_portaudio_make_source (int sampling_rate,
- const std::string dev = "",
- bool ok_to_block = true
- ) throw (std::runtime_error);
-
-class audio_portaudio_source : public gr_sync_block {
-
- protected:
- audio_portaudio_source (int sampling_rate,
- const std::string device_name,
- bool ok_to_block
- ) throw (std::runtime_error);
-
- public:
- ~audio_portaudio_source ();
-};
-
-// ----------------------------------------------------------------
-
-GR_SWIG_BLOCK_MAGIC(audio_portaudio,sink)
-
-audio_portaudio_sink_sptr
-audio_portaudio_make_sink (int sampling_rate,
- const std::string dev = "",
- bool ok_to_block = true
- ) throw (std::runtime_error);
-
-class audio_portaudio_sink : public gr_sync_block {
-
- protected:
- audio_portaudio_sink (int sampling_rate,
- const std::string device_name,
- bool ok_to_block
- ) throw (std::runtime_error);
-
- public:
- ~audio_portaudio_sink ();
-};
-
-#if SWIGGUILE
-%scheme %{
-(load-extension-global "libguile-gnuradio-audio_portaudio" "scm_init_gnuradio_audio_portaudio_module")
-%}
-
-%goops %{
-(use-modules (gnuradio gnuradio_core_runtime))
-%}
-#endif
diff --git a/gr-audio-portaudio/src/qa_portaudio.py b/gr-audio-portaudio/src/qa_portaudio.py
deleted file mode 100755
index 20731f38d..000000000
--- a/gr-audio-portaudio/src/qa_portaudio.py
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2005,2010 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-from gnuradio import gr, gr_unittest
-import audio_portaudio
-
-class test_audio_portaudio (gr_unittest.TestCase):
-
- def setUp (self):
- self.tb = gr.top_block ()
-
- def tearDown (self):
- self.tb = None
-
- def test_000_nop (self):
- """Just see if we can import the module...
- They may not have PORTAUDIO drivers, etc. Don't try to run anything"""
- pass
-
-if __name__ == '__main__':
- gr_unittest.run(test_audio_portaudio, "test_audio_portaudio.xml")
diff --git a/gr-audio-portaudio/src/run_tests.in b/gr-audio-portaudio/src/run_tests.in
deleted file mode 100644
index 0b483dbcf..000000000
--- a/gr-audio-portaudio/src/run_tests.in
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-# 1st parameter is absolute path to component source directory
-# 2nd parameter is absolute path to component build directory
-# 3rd parameter is path to Python QA directory
-
-@top_builddir@/run_tests.sh \
- @abs_top_srcdir@/gr-audio-portaudio \
- @abs_top_builddir@/gr-audio-portaudio \
- @srcdir@
diff --git a/gr-audio-windows/.gitignore b/gr-audio-windows/.gitignore
deleted file mode 100644
index 53edad32f..000000000
--- a/gr-audio-windows/.gitignore
+++ /dev/null
@@ -1,32 +0,0 @@
-/*.cache
-/*.la
-/*.lo
-/*.pc
-/.deps
-/.la
-/.libs
-/.lo
-/Makefile
-/Makefile.in
-/aclocal.m4
-/autom4te.cache
-/config.cache
-/config.h
-/config.h.in
-/config.log
-/config.status
-/configure
-/depcomp
-/install-sh
-/libtool
-/ltmain.sh
-/make.log
-/missing
-/missing
-/mkinstalldirs
-/py-compile
-/stamp-h
-/stamp-h.in
-/stamp-h1
-/stamp-h1.in
-/stamp-h2.in
diff --git a/gr-audio-windows/README b/gr-audio-windows/README
deleted file mode 100644
index 4564c7c7b..000000000
--- a/gr-audio-windows/README
+++ /dev/null
@@ -1,66 +0,0 @@
-
-# Copyright 2001,2005 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-
-gr-audio-windows will add an audio-sink to gnuradio for windows
-
-Requirements for building:
-make sure you have the following installed:
-mingw
-libtool (recent version ,built yourself, (if needed remove old libtool macros from /usr/share/aclocal))
-msys
-python2.4 (just install the prebuild binary for windows)
-boost (built yourself, maybe just unpacking the source somewhere will do, we only use header files)
-cppunit (built yourself)
-gnuradio-core (built with mingw)
-
-Building:
-sources from cvs:
-edit bootstrap to your needs (see below for example)
-./bootstrap
-./configure /configure --with-cppunit-prefix=/whereiscppunit --with-boost-include-dir=/c/whereisboost PYTHON=/c/Python24/python am_cv_python_pythondir=/c/Python24/Lib/site-packages am_cv_python_pyexecdir=/c/Python24/Lib/site-packages
-make
-make check
-make install
-
-
-If you have multiple versions of aclocal then edit bootstrap and change aclocal and automake to the latest version
-
-You really need a recent libtool to get this built on mingw.
-If you build it with default options it will be placed in /usr/local, but the default libtool will still be in /usr.
-This will result in old m4 macros will be used by aclocal.
-So if you have a more recent libtool installed in /usr/local add -I /usr/local/share/aclocal to the aclocal commandline in bootstrap.
-(And add any other directories with the most recent m4 macros)
-You could also uninstall (delete) the old libtool macros in /usr/share/aclocal
-
-bootstrap example:
-
-!/bin/sh
-rm -fr config.cache autom4te*.cache
-aclocal-1.8 -I /usr/local/share/aclocal -I config
-autoconf
-autoheader
-libtoolize --automake
-automake-1.8 --add-missing
-
-
-configuration example:
-./configure --with-cppunit-prefix=/usr/local --with-boost-include-dir=/d/boost_1_32_0/include/boost-1_32 PYTHON=/d/Python24/python am_cv_python_pythondir=/d/Python24/Lib/site-packages am_cv_python_pyexecdir=/d/Python24/Lib/site-packages
-
-Martin Dvh, juli 2005
diff --git a/gr-audio-windows/src/.gitignore b/gr-audio-windows/src/.gitignore
deleted file mode 100644
index 7f6631569..000000000
--- a/gr-audio-windows/src/.gitignore
+++ /dev/null
@@ -1,38 +0,0 @@
-/*.cache
-/*.la
-/*.lo
-/*.pc
-/.deps
-/.la
-/.libs
-/.lo
-/Makefile
-/Makefile.in
-/aclocal.m4
-/autom4te.cache
-/config.cache
-/config.h
-/config.h.in
-/config.log
-/config.status
-/configure
-/depcomp
-/install-sh
-/libtool
-/ltmain.sh
-/make.log
-/missing
-/missing
-/mkinstalldirs
-/py-compile
-/stamp-h
-/stamp-h.in
-/stamp-h1
-/stamp-h1.in
-/stamp-h2.in
-/run_tests
-/audio_windows.cc
-/audio_windows.py
-/gnuradio
-/guile
-/python
diff --git a/gr-audio-windows/src/Makefile.am b/gr-audio-windows/src/Makefile.am
deleted file mode 100644
index 1d7b253ec..000000000
--- a/gr-audio-windows/src/Makefile.am
+++ /dev/null
@@ -1,72 +0,0 @@
-#
-# Copyright 2004,2005,2008,2009 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-include $(top_srcdir)/Makefile.common
-include $(top_srcdir)/Makefile.swig
-
-TESTS =
-DISTCLEANFILES += run_tests
-EXTRA_DIST += run_tests.in
-
-AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
-
-noinst_PYTHON = qa_audio_windows.py
-
-# C/C++ headers get installed in ${prefix}/include/gnuradio
-grinclude_HEADERS = \
- audio_windows_sink.h \
- audio_windows_source.h
-
-lib_LTLIBRARIES = libgnuradio-audio-windows.la
-
-libgnuradio_audio_windows_la_SOURCES = \
- audio_windows_sink.cc \
- audio_windows_source.cc
-
-libgnuradio_audio_windows_la_LIBADD = \
- $(GNURADIO_CORE_LA) \
- $(WINAUDIO_LIBS)
-
-libgnuradio_audio_windows_la_LDFLAGS = \
- $(LIBGNURADIO_CORE_EXTRA_LDFLAGS) \
- $(NO_UNDEFINED) \
- $(LTVERSIONFLAGS)
-
-###################################
-# SWIG interface and library
-
-TOP_SWIG_IFILES = \
- audio_windows.i
-
-# Install so that they end up available as:
-# import gnuradio.audio_windows
-# This ends up at:
-# ${prefix}/lib/python${python_version}/site-packages/gnuradio
-audio_windows_pythondir_category = \
- gnuradio
-
-# additional libraries for linking with the SWIG-generated library
-audio_windows_la_swig_libadd = \
- libgnuradio-audio-windows.la
-
-if PYTHON
-TESTS += run_tests
-endif
diff --git a/gr-audio-windows/src/Makefile.swig.gen b/gr-audio-windows/src/Makefile.swig.gen
deleted file mode 100644
index cc21f30bc..000000000
--- a/gr-audio-windows/src/Makefile.swig.gen
+++ /dev/null
@@ -1,145 +0,0 @@
-# -*- Makefile -*-
-#
-# Copyright 2009 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-# Makefile.swig.gen for audio_windows.i
-
-## Default install locations for these files:
-##
-## Default location for the Python directory is:
-## ${prefix}/lib/python${python_version}/site-packages/[category]/audio_windows
-## Default location for the Python exec directory is:
-## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/audio_windows
-##
-## The following can be overloaded to change the install location, but
-## this has to be done in the including Makefile.am -before-
-## Makefile.swig is included.
-
-audio_windows_pythondir_category ?= gnuradio/audio_windows
-audio_windows_pylibdir_category ?= $(audio_windows_pythondir_category)
-audio_windows_pythondir = $(pythondir)/$(audio_windows_pythondir_category)
-audio_windows_pylibdir = $(pyexecdir)/$(audio_windows_pylibdir_category)
-
-# The .so libraries for the guile modules get installed whereever guile
-# is installed, usually /usr/lib/guile/gnuradio/
-# FIXME: determince whether these should be installed with gnuradio.
-audio_windows_scmlibdir = $(libdir)
-
-# The scm files for the guile modules get installed where ever guile
-# is installed, usually /usr/share/guile/site/audio_windows
-# FIXME: determince whether these should be installed with gnuradio.
-audio_windows_scmdir = $(guiledir)
-
-## SWIG headers are always installed into the same directory.
-
-audio_windows_swigincludedir = $(swigincludedir)
-
-## This is a template file for a "generated" Makefile addition (in
-## this case, "Makefile.swig.gen"). By including the top-level
-## Makefile.swig, this file will be used to generate the SWIG
-## dependencies. Assign the variable TOP_SWIG_FILES to be the list of
-## SWIG .i files to generated wrappings for; there can be more than 1
-## so long as the names are unique (no sorting is done on the
-## TOP_SWIG_FILES list). This file explicitly assumes that a SWIG .i
-## file will generate .cc, .py, and possibly .h files -- meaning that
-## all of these files will have the same base name (that provided for
-## the SWIG .i file).
-##
-## This code is setup to ensure parallel MAKE ("-j" or "-jN") does the
-## right thing. For more info, see <
-## http://sources.redhat.com/automake/automake.html#Multiple-Outputs >
-
-## Other cleaned files: dependency files generated by SWIG or this Makefile
-
-MOSTLYCLEANFILES += $(DEPDIR)/*.S*
-
-## Various SWIG variables. These can be overloaded in the including
-## Makefile.am by setting the variable value there, then including
-## Makefile.swig .
-
-audio_windows_swiginclude_HEADERS = \
- audio_windows.i \
- $(audio_windows_swiginclude_headers)
-
-if PYTHON
-audio_windows_pylib_LTLIBRARIES = \
- _audio_windows.la
-
-_audio_windows_la_SOURCES = \
- python/audio_windows.cc \
- $(audio_windows_la_swig_sources)
-
-audio_windows_python_PYTHON = \
- audio_windows.py \
- $(audio_windows_python)
-
-_audio_windows_la_LIBADD = \
- $(STD_SWIG_LA_LIB_ADD) \
- $(audio_windows_la_swig_libadd)
-
-_audio_windows_la_LDFLAGS = \
- $(STD_SWIG_LA_LD_FLAGS) \
- $(audio_windows_la_swig_ldflags)
-
-_audio_windows_la_CXXFLAGS = \
- $(STD_SWIG_CXX_FLAGS) \
- -I$(top_builddir) \
- $(audio_windows_la_swig_cxxflags)
-
-python/audio_windows.cc: audio_windows.py
-audio_windows.py: audio_windows.i
-
-# Include the python dependencies for this file
--include python/audio_windows.d
-
-endif # end of if python
-
-if GUILE
-
-audio_windows_scmlib_LTLIBRARIES = \
- libguile-gnuradio-audio_windows.la
-libguile_gnuradio_audio_windows_la_SOURCES = \
- guile/audio_windows.cc \
- $(audio_windows_la_swig_sources)
-nobase_audio_windows_scm_DATA = \
- gnuradio/audio_windows.scm \
- gnuradio/audio_windows-primitive.scm
-libguile_gnuradio_audio_windows_la_LIBADD = \
- $(STD_SWIG_LA_LIB_ADD) \
- $(audio_windows_la_swig_libadd)
-libguile_gnuradio_audio_windows_la_LDFLAGS = \
- $(STD_SWIG_LA_LD_FLAGS) \
- $(audio_windows_la_swig_ldflags)
-libguile_gnuradio_audio_windows_la_CXXFLAGS = \
- $(STD_SWIG_CXX_FLAGS) \
- -I$(top_builddir) \
- $(audio_windows_la_swig_cxxflags)
-
-guile/audio_windows.cc: gnuradio/audio_windows.scm
-gnuradio/audio_windows.scm: audio_windows.i
-gnuradio/audio_windows-primitive.scm: gnuradio/audio_windows.scm
-
-# Include the guile dependencies for this file
--include guile/audio_windows.d
-
-endif # end of GUILE
-
-
diff --git a/gr-audio-windows/src/audio_windows.i b/gr-audio-windows/src/audio_windows.i
deleted file mode 100644
index c154eacd6..000000000
--- a/gr-audio-windows/src/audio_windows.i
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2009 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-%include "gnuradio.i" // the common stuff
-
-%{
-#include "audio_windows_sink.h"
-#include "audio_windows_source.h"
-%}
-
-// ----------------------------------------------------------------
-
-GR_SWIG_BLOCK_MAGIC(audio_windows,sink)
-
-audio_windows_sink_sptr
-audio_windows_make_sink (int sampling_freq,
- const std::string dev = ""
- ) throw (std::runtime_error);
-
-
-class audio_windows_sink : public gr_sync_block {
- protected:
- audio_windows_sink (int sampling_freq, const std::string device_name = "");
-
- public:
- ~audio_windows_sink ();
-};
-
-// ----------------------------------------------------------------
-
-GR_SWIG_BLOCK_MAGIC(audio_windows,source)
-
-audio_windows_source_sptr
-audio_windows_make_source (int sampling_freq,
- const std::string dev = ""
- ) throw (std::runtime_error);
-
-class audio_windows_source : public gr_sync_block {
- protected:
- audio_windows_source (int sampling_freq, const std::string device_name = "");
-
- public:
- ~audio_windows_source ();
-};
-
-#if SWIGGUILE
-%scheme %{
-(load-extension-global "libguile-gnuradio-audio_windows" "scm_init_gnuradio_audio_windows_module")
-%}
-
-%goops %{
-(use-modules (gnuradio gnuradio_core_runtime))
-%}
-#endif
diff --git a/gr-audio-windows/src/qa_audio_windows.py b/gr-audio-windows/src/qa_audio_windows.py
deleted file mode 100755
index 0d14535a6..000000000
--- a/gr-audio-windows/src/qa_audio_windows.py
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2005,2007 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-from gnuradio import gr, gr_unittest
-import audio_windows
-
-class qa_oss (gr_unittest.TestCase):
-
- def setUp (self):
- self.tb = gr.top_block ()
-
- def tearDown (self):
- self.tb = None
-
- def test_000_nop (self):
- """Just see if we can import the module...
- They may not have audio drivers, soundcard, etc. Don't try to run anything"""
- pass
-
-if __name__ == '__main__':
- gr_unittest.main ()
diff --git a/gr-audio-windows/src/run_tests.in b/gr-audio-windows/src/run_tests.in
deleted file mode 100755
index f7de663ba..000000000
--- a/gr-audio-windows/src/run_tests.in
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-# 1st parameter is absolute path to component source directory
-# 2nd parameter is absolute path to component build directory
-# 3rd parameter is path to Python QA directory
-
-@top_builddir@/run_tests.sh \
- @abs_top_srcdir@/gr-audio-windows \
- @abs_top_builddir@/gr-audio-windows \
- @srcdir@
diff --git a/gr-audio/.gitignore b/gr-audio/.gitignore
new file mode 100644
index 000000000..a37fc0c1a
--- /dev/null
+++ b/gr-audio/.gitignore
@@ -0,0 +1,3 @@
+/Makefile
+/Makefile.in
+/*.pc
diff --git a/gr-audio-oss/Makefile.am b/gr-audio/Makefile.am
index c55d3ecb7..bb0d05d07 100644
--- a/gr-audio-oss/Makefile.am
+++ b/gr-audio/Makefile.am
@@ -1,5 +1,5 @@
#
-# Copyright 2004,2006 Free Software Foundation, Inc.
+# Copyright 2011 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -17,14 +17,15 @@
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
-#
+#
include $(top_srcdir)/Makefile.common
-SUBDIRS = src
+SUBDIRS = include lib
-pkgconfigdir = $(libdir)/pkgconfig
-dist_pkgconfig_DATA = gnuradio-audio-oss.pc
+if PYTHON
+SUBDIRS += grc swig
+endif
-etcdir = $(gr_prefsdir)
-dist_etc_DATA = gr-audio-oss.conf
+pkgconfigdir = $(libdir)/pkgconfig
+dist_pkgconfig_DATA = gnuradio-audio.pc
diff --git a/gr-audio/README b/gr-audio/README
new file mode 100644
index 000000000..ae929a94a
--- /dev/null
+++ b/gr-audio/README
@@ -0,0 +1,11 @@
+The gnuradio audio component provides an audio_source and audio_sink block.
+The audio blocks stream floating point samples to and from audio hardware.
+
+The gr-audio will be built automatically when gnuradio-core is enabled.
+Support for underlying audio architectures depends on OS and installed libraries.
+At the time of writing, gr-audio supports oss, alsa, jack, portaudio, audiounit, and winmm.
+
+At runtime, gr-audio will automatically select from the available architectures.
+The user can override the selection via configuration file by setting "audio_module"
+to one of the following strings: oss, alsa, jack, portaudio, osx, or windows.
+See gr-audio.conf for an example.
diff --git a/gr-audio-oss/gnuradio-audio-oss.pc.in b/gr-audio/gnuradio-audio.pc.in
index 4a215bdab..1cd6d4051 100644
--- a/gr-audio-oss/gnuradio-audio-oss.pc.in
+++ b/gr-audio/gnuradio-audio.pc.in
@@ -3,9 +3,9 @@ exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
-Name: gnuradio-audio-oss
-Description: The GNU Radio block for the OSS sound system
+Name: gnuradio-audio
+Description: The GNU Radio block for all supported audio sound systems
Requires: gnuradio-core
Version: @LIBVER@
-Libs: -L${libdir} -lgnuradio-audio-oss
+Libs: -L${libdir} -lgnuradio-audio
Cflags: -I${includedir}
diff --git a/gr-audio/grc/.gitignore b/gr-audio/grc/.gitignore
new file mode 100644
index 000000000..b336cc7ce
--- /dev/null
+++ b/gr-audio/grc/.gitignore
@@ -0,0 +1,2 @@
+/Makefile
+/Makefile.in
diff --git a/gr-audio-jack/Makefile.am b/gr-audio/grc/Makefile.am
index cdc1433db..36d9daa7a 100644
--- a/gr-audio-jack/Makefile.am
+++ b/gr-audio/grc/Makefile.am
@@ -1,5 +1,5 @@
#
-# Copyright 2004,2009 Free Software Foundation, Inc.
+# Copyright 2011 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -21,10 +21,9 @@
include $(top_srcdir)/Makefile.common
-SUBDIRS = src
+grcblocksdir = $(grc_blocksdir)
-pkgconfigdir = $(libdir)/pkgconfig
-dist_pkgconfig_DATA = gnuradio-audio-jack.pc
+dist_grcblocks_DATA = \
+ audio_source.xml \
+ audio_sink.xml
-etcdir = $(gr_prefsdir)
-dist_etc_DATA = gr-audio-jack.conf
diff --git a/grc/blocks/audio_sink.xml b/gr-audio/grc/audio_sink.xml
index 75d583470..26e199d61 100644
--- a/grc/blocks/audio_sink.xml
+++ b/gr-audio/grc/audio_sink.xml
@@ -7,12 +7,13 @@
<block>
<name>Audio Sink</name>
<key>audio_sink</key>
+ <category>Sinks</category>
<import>from gnuradio import audio</import>
<make>audio.sink($samp_rate, $device_name, $ok_to_block)</make>
<param>
<name>Sample Rate</name>
<key>samp_rate</key>
- <value>32000</value>
+ <value>samp_rate</value>
<type>int</type>
<option>
<name>16KHz</name>
diff --git a/grc/blocks/audio_source.xml b/gr-audio/grc/audio_source.xml
index 1f5d1033e..59b375244 100644
--- a/grc/blocks/audio_source.xml
+++ b/gr-audio/grc/audio_source.xml
@@ -7,12 +7,13 @@
<block>
<name>Audio Source</name>
<key>audio_source</key>
+ <category>Sources</category>
<import>from gnuradio import audio</import>
<make>audio.source($samp_rate, $device_name, $ok_to_block)</make>
<param>
<name>Sample Rate</name>
<key>samp_rate</key>
- <value>32000</value>
+ <value>samp_rate</value>
<type>int</type>
<option>
<name>16KHz</name>
diff --git a/gr-audio/include/.gitignore b/gr-audio/include/.gitignore
new file mode 100644
index 000000000..b336cc7ce
--- /dev/null
+++ b/gr-audio/include/.gitignore
@@ -0,0 +1,2 @@
+/Makefile
+/Makefile.in
diff --git a/gr-audio-osx/Makefile.am b/gr-audio/include/Makefile.am
index 84a4c69b3..a4db27d08 100644
--- a/gr-audio-osx/Makefile.am
+++ b/gr-audio/include/Makefile.am
@@ -1,5 +1,5 @@
#
-# Copyright 2004,2006,2010 Free Software Foundation, Inc.
+# Copyright 2011 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -17,9 +17,11 @@
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
-#
+#
include $(top_srcdir)/Makefile.common
-EXTRA_DIST += README_OSX
-SUBDIRS = src
+grinclude_HEADERS = \
+ gr_audio_api.h \
+ gr_audio_source.h \
+ gr_audio_sink.h
diff --git a/gnuradio-examples/c++/dial_tone/dial_tone.h b/gr-audio/include/gr_audio_api.h
index c645439bb..b21819bab 100644
--- a/gnuradio-examples/c++/dial_tone/dial_tone.h
+++ b/gr-audio/include/gr_audio_api.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006 Free Software Foundation, Inc.
+ * Copyright 2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -19,15 +19,13 @@
* Boston, MA 02110-1301, USA.
*/
-#include <gr_top_block.h>
+#ifndef INCLUDED_GR_AUDIO_API_H
+#define INCLUDED_GR_AUDIO_API_H
-class dial_tone;
-typedef boost::shared_ptr<dial_tone> dial_tone_sptr;
-dial_tone_sptr make_dial_tone();
+#ifdef gnuradio_audio_EXPORTS
+# define GR_AUDIO_API //FIXME needs attributes defines
+#else
+# define GR_AUDIO_API //FIXME needs attributes defines
+#endif
-class dial_tone : public gr_top_block
-{
-private:
- dial_tone();
- friend dial_tone_sptr make_dial_tone();
-};
+#endif /* INCLUDED_GR_AUDIO_API_H */
diff --git a/gnuradio-examples/c++/dial_tone/main.cc b/gr-audio/include/gr_audio_sink.h
index a09bd8288..c76ec6550 100644
--- a/gnuradio-examples/c++/dial_tone/main.cc
+++ b/gr-audio/include/gr_audio_sink.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006 Free Software Foundation, Inc.
+ * Copyright 2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -19,17 +19,28 @@
* Boston, MA 02110-1301, USA.
*/
-// GNU Radio C++ application
-//
-// Instantiate a top block
-// Instantiate a runtime, passing it the top block
-// Tell the runtime to go...
+#ifndef INCLUDED_GR_AUDIO_SINK_H
+#define INCLUDED_GR_AUDIO_SINK_H
-#include <dial_tone.h>
+#include <gr_audio_api.h>
+#include <gr_sync_block.h>
-int main()
-{
- dial_tone_sptr top_block = make_dial_tone();
- top_block->run();
- return 0;
-}
+class GR_AUDIO_API audio_sink : public gr_sync_block{
+public:
+ typedef boost::shared_ptr<audio_sink> sptr;
+
+ audio_sink(
+ const std::string &name,
+ gr_io_signature_sptr insig,
+ gr_io_signature_sptr outsig
+ );
+
+};
+
+GR_AUDIO_API audio_sink::sptr audio_make_sink(
+ int sampling_rate,
+ const std::string device_name = "",
+ bool ok_to_block = true
+);
+
+#endif /* INCLUDED_GR_AUDIO_SINK_H */
diff --git a/gnuradio-examples/c++/dial_tone/dial_tone.cc b/gr-audio/include/gr_audio_source.h
index 9a2772a18..ed3c31c10 100644
--- a/gnuradio-examples/c++/dial_tone/dial_tone.cc
+++ b/gr-audio/include/gr_audio_source.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006,2008 Free Software Foundation, Inc.
+ * Copyright 2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -19,25 +19,28 @@
* Boston, MA 02110-1301, USA.
*/
-#include <dial_tone.h>
-#include <gr_io_signature.h>
-#include <gr_sig_source_f.h>
-#include <audio_alsa_sink.h>
+#ifndef INCLUDED_GR_AUDIO_SOURCE_H
+#define INCLUDED_GR_AUDIO_SOURCE_H
-// Shared pointer constructor
-dial_tone_sptr make_dial_tone()
-{
- return gnuradio::get_initial_sptr(new dial_tone());
-}
+#include <gr_audio_api.h>
+#include <gr_sync_block.h>
-// Hierarchical block constructor, with no inputs or outputs
-dial_tone::dial_tone() :
- gr_top_block("dial_tone")
-{
- gr_sig_source_f_sptr src0 = gr_make_sig_source_f(48000, GR_SIN_WAVE, 350, 0.1);
- gr_sig_source_f_sptr src1 = gr_make_sig_source_f(48000, GR_SIN_WAVE, 440, 0.1);
- audio_alsa_sink_sptr sink = audio_alsa_make_sink(48000);
+class GR_AUDIO_API audio_source : public gr_sync_block{
+public:
+ typedef boost::shared_ptr<audio_source> sptr;
- connect(src0, 0, sink, 0);
- connect(src1, 0, sink, 1);
-}
+ audio_source(
+ const std::string &name,
+ gr_io_signature_sptr insig,
+ gr_io_signature_sptr outsig
+ );
+
+};
+
+GR_AUDIO_API audio_source::sptr audio_make_source(
+ int sampling_rate,
+ const std::string device_name = "",
+ bool ok_to_block = true
+);
+
+#endif /* INCLUDED_GR_AUDIO_SOURCE_H */
diff --git a/gr-audio/lib/.gitignore b/gr-audio/lib/.gitignore
new file mode 100644
index 000000000..b336cc7ce
--- /dev/null
+++ b/gr-audio/lib/.gitignore
@@ -0,0 +1,2 @@
+/Makefile
+/Makefile.in
diff --git a/gr-audio/lib/Makefile.am b/gr-audio/lib/Makefile.am
new file mode 100644
index 000000000..42a2b867b
--- /dev/null
+++ b/gr-audio/lib/Makefile.am
@@ -0,0 +1,179 @@
+#
+# Copyright 2011 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+include $(top_srcdir)/Makefile.common
+
+AM_CPPFLAGS = \
+ $(STD_DEFINES_AND_INCLUDES) \
+ $(WITH_INCLUDES) \
+ -I$(abs_top_srcdir)/gr-audio/include \
+ -Dgnuradio_audio_EXPORTS
+
+lib_LTLIBRARIES = libgnuradio-audio.la
+
+libgnuradio_audio_la_SOURCES = \
+ gr_audio_registry.cc
+
+libgnuradio_audio_la_LIBADD = \
+ $(GNURADIO_CORE_LA)
+
+libgnuradio_audio_la_LDFLAGS = $(LTVERSIONFLAGS)
+
+noinst_HEADERS = gr_audio_registry.h
+
+etcdir = $(gr_prefsdir)
+dist_etc_DATA = gr-audio.conf
+
+########################################################################
+## ALSA Support
+########################################################################
+if GR_AUDIO_ALSA_SUPPORT
+
+AM_CPPFLAGS += \
+ -I$(srcdir)/alsa \
+ $(ALSA_CPPFLAGS)
+
+libgnuradio_audio_la_LIBADD += $(ALSA_LIBS)
+
+libgnuradio_audio_la_SOURCES += \
+ alsa/gri_alsa.cc \
+ alsa/audio_alsa_source.cc \
+ alsa/audio_alsa_sink.cc
+
+noinst_HEADERS += \
+ alsa/gri_alsa.h \
+ alsa/audio_alsa_source.h \
+ alsa/audio_alsa_sink.h
+
+dist_etc_DATA += alsa/gr-audio-alsa.conf
+
+endif
+
+########################################################################
+## OSS Support
+########################################################################
+if GR_AUDIO_OSS_SUPPORT
+
+AM_CPPFLAGS += \
+ -I$(srcdir)/oss
+
+libgnuradio_audio_la_LIBADD += $(OSS_LIBS)
+
+libgnuradio_audio_la_SOURCES += \
+ oss/audio_oss_source.cc \
+ oss/audio_oss_sink.cc
+
+noinst_HEADERS += \
+ oss/audio_oss_source.h \
+ oss/audio_oss_sink.h
+
+dist_etc_DATA += oss/gr-audio-oss.conf
+
+endif
+
+########################################################################
+## Jack Support
+########################################################################
+if GR_AUDIO_JACK_SUPPORT
+
+AM_CPPFLAGS += \
+ -I$(srcdir)/jack \
+ $(JACK_CPPFLAGS)
+
+libgnuradio_audio_la_LIBADD += $(JACK_LIBS)
+
+libgnuradio_audio_la_SOURCES += \
+ jack/gri_jack.cc \
+ jack/audio_jack_source.cc \
+ jack/audio_jack_sink.cc
+
+noinst_HEADERS += \
+ jack/gri_jack.h \
+ jack/audio_jack_source.h \
+ jack/audio_jack_sink.h
+
+dist_etc_DATA += jack/gr-audio-jack.conf
+
+endif
+
+########################################################################
+## OSX Support
+########################################################################
+if GR_AUDIO_OSX_SUPPORT
+
+AM_CPPFLAGS += \
+ -I$(srcdir)/osx
+
+libgnuradio_audio_la_SOURCES += \
+ osx/audio_osx_source.cc \
+ osx/audio_osx_sink.cc
+
+noinst_HEADERS += \
+ osx/audio_osx.h \
+ osx/audio_osx_source.h \
+ osx/audio_osx_sink.h
+
+endif
+
+########################################################################
+## PortAudio Support
+########################################################################
+if GR_AUDIO_PORTAUDIO_SUPPORT
+
+AM_CPPFLAGS += \
+ -I$(srcdir)/portaudio \
+ $(PORTAUDIO_CPPFLAGS)
+
+libgnuradio_audio_la_LIBADD += $(PORTAUDIO_LIBS)
+
+libgnuradio_audio_la_SOURCES += \
+ portaudio/gri_portaudio.cc \
+ portaudio/audio_portaudio_source.cc \
+ portaudio/audio_portaudio_sink.cc
+
+noinst_HEADERS += \
+ portaudio/gri_portaudio.h \
+ portaudio/audio_portaudio_source.h \
+ portaudio/audio_portaudio_sink.h
+
+dist_etc_DATA += portaudio/gr-audio-portaudio.conf
+
+endif
+
+########################################################################
+## Windows Support
+########################################################################
+if GR_AUDIO_WINDOWS_SUPPORT
+
+AM_CPPFLAGS += \
+ -I$(srcdir)/windows
+
+libgnuradio_audio_la_LIBADD += $(WINAUDIO_LIBS)
+
+libgnuradio_audio_la_SOURCES += \
+ windows/audio_windows_source.cc \
+ windows/audio_windows_sink.cc
+
+noinst_HEADERS += \
+ windows/audio_windows_source.h \
+ windows/audio_windows_sink.h
+
+endif
diff --git a/gr-audio-alsa/src/audio_alsa_sink.cc b/gr-audio/lib/alsa/audio_alsa_sink.cc
index d44a93b3f..0728f421c 100644
--- a/gr-audio-alsa/src/audio_alsa_sink.cc
+++ b/gr-audio/lib/alsa/audio_alsa_sink.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004,2010 Free Software Foundation, Inc.
+ * Copyright 2004-2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -24,6 +24,7 @@
#include "config.h"
#endif
+#include "gr_audio_registry.h"
#include <audio_alsa_sink.h>
#include <gr_io_signature.h>
#include <gr_prefs.h>
@@ -32,6 +33,11 @@
#include <stdexcept>
#include <gri_alsa.h>
+AUDIO_REGISTER_SINK(REG_PRIO_HIGH, alsa)(
+ int sampling_rate, const std::string &device_name, bool ok_to_block
+){
+ return audio_sink::sptr(new audio_alsa_sink(sampling_rate, device_name, ok_to_block));
+}
static bool CHATTY_DEBUG = false;
@@ -65,19 +71,10 @@ default_nperiods ()
// ----------------------------------------------------------------
-audio_alsa_sink_sptr
-audio_alsa_make_sink (int sampling_rate,
- const std::string dev,
- bool ok_to_block)
-{
- return gnuradio::get_initial_sptr(new audio_alsa_sink (sampling_rate, dev,
- ok_to_block));
-}
-
audio_alsa_sink::audio_alsa_sink (int sampling_rate,
const std::string device_name,
bool ok_to_block)
- : gr_sync_block ("audio_alsa_sink",
+ : audio_sink ("audio_alsa_sink",
gr_make_io_signature (0, 0, 0),
gr_make_io_signature (0, 0, 0)),
d_sampling_rate (sampling_rate),
diff --git a/gr-audio-alsa/src/audio_alsa_sink.h b/gr-audio/lib/alsa/audio_alsa_sink.h
index f3007f60f..23e406d6b 100644
--- a/gr-audio-alsa/src/audio_alsa_sink.h
+++ b/gr-audio/lib/alsa/audio_alsa_sink.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004 Free Software Foundation, Inc.
+ * Copyright 2004-2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -27,27 +27,11 @@
#define ALSA_PCM_NEW_HW_PARAMS_API
#define ALSA_PCM_NEW_SW_PARAMS_API
-#include <gr_sync_block.h>
+#include <gr_audio_sink.h>
#include <string>
#include <alsa/asoundlib.h>
#include <stdexcept>
-
-class audio_alsa_sink;
-typedef boost::shared_ptr<audio_alsa_sink> audio_alsa_sink_sptr;
-
-/*!
- * \brief make an alsa audio sink.
- *
- * \param sampling_rate sampling rate in Hz
- * \param device_name ALSA pcm device name, e.g., "hw:0,0"
- * \param ok_to_block (currently ignored)
- */
-audio_alsa_sink_sptr
-audio_alsa_make_sink (int sampling_rate,
- const std::string device_name = "",
- bool ok_to_block = true);
-
/*!
* \brief audio sink using ALSA
*
@@ -56,11 +40,7 @@ audio_alsa_make_sink (int sampling_rate,
*
* Input samples must be in the range [-1,1].
*/
-class audio_alsa_sink : public gr_sync_block {
- friend audio_alsa_sink_sptr
- audio_alsa_make_sink (int sampling_rate, const std::string device_name,
- bool ok_to_block);
-
+class audio_alsa_sink : public audio_sink {
// typedef for pointer to class work method
typedef int (audio_alsa_sink::*work_t)(int noutput_items,
gr_vector_const_void_star &input_items,
@@ -88,11 +68,10 @@ class audio_alsa_sink : public gr_sync_block {
void output_error_msg (const char *msg, int err);
void bail (const char *msg, int err) throw (std::runtime_error);
- protected:
+public:
audio_alsa_sink (int sampling_rate, const std::string device_name,
bool ok_to_block);
- public:
~audio_alsa_sink ();
bool check_topology (int ninputs, int noutputs);
diff --git a/gr-audio-alsa/src/audio_alsa_source.cc b/gr-audio/lib/alsa/audio_alsa_source.cc
index 7b3d91b9d..e46a7fdd4 100644
--- a/gr-audio-alsa/src/audio_alsa_source.cc
+++ b/gr-audio/lib/alsa/audio_alsa_source.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004,2006,2010 Free Software Foundation, Inc.
+ * Copyright 2004-2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -24,6 +24,7 @@
#include "config.h"
#endif
+#include "gr_audio_registry.h"
#include <audio_alsa_source.h>
#include <gr_io_signature.h>
#include <gr_prefs.h>
@@ -32,6 +33,11 @@
#include <stdexcept>
#include <gri_alsa.h>
+AUDIO_REGISTER_SOURCE(REG_PRIO_HIGH, alsa)(
+ int sampling_rate, const std::string &device_name, bool ok_to_block
+){
+ return audio_source::sptr(new audio_alsa_source(sampling_rate, device_name, ok_to_block));
+}
static bool CHATTY_DEBUG = false;
@@ -64,18 +70,10 @@ default_nperiods ()
// ----------------------------------------------------------------
-audio_alsa_source_sptr
-audio_alsa_make_source (int sampling_rate, const std::string dev,
- bool ok_to_block)
-{
- return gnuradio::get_initial_sptr(new audio_alsa_source (sampling_rate, dev,
- ok_to_block));
-}
-
audio_alsa_source::audio_alsa_source (int sampling_rate,
const std::string device_name,
bool ok_to_block)
- : gr_sync_block ("audio_alsa_source",
+ : audio_source ("audio_alsa_source",
gr_make_io_signature (0, 0, 0),
gr_make_io_signature (0, 0, 0)),
d_sampling_rate (sampling_rate),
diff --git a/gr-audio-alsa/src/audio_alsa_source.h b/gr-audio/lib/alsa/audio_alsa_source.h
index db6c45683..e38af3872 100644
--- a/gr-audio-alsa/src/audio_alsa_source.h
+++ b/gr-audio/lib/alsa/audio_alsa_source.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004,2006 Free Software Foundation, Inc.
+ * Copyright 2004-2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -27,7 +27,7 @@
#define ALSA_PCM_NEW_HW_PARAMS_API
#define ALSA_PCM_NEW_SW_PARAMS_API
-#include <gr_sync_block.h>
+#include <gr_audio_source.h>
#include <string>
#include <alsa/asoundlib.h>
#include <stdexcept>
@@ -36,18 +36,6 @@ class audio_alsa_source;
typedef boost::shared_ptr<audio_alsa_source> audio_alsa_source_sptr;
/*!
- * \brief Make an ALSA audio source.
- *
- * \param sampling_rate sampling rate
- * \param device_name ALSA pcm device name, e.g., "hw:0,0"
- * \param ok_to_block (currently ignored)
- */
-audio_alsa_source_sptr
-audio_alsa_make_source (int sampling_rate,
- const std::string device_name = "",
- bool ok_to_block = true);
-
-/*!
* \brief audio source using ALSA
*
* The source has between 1 and N input streams of floats, where N is
@@ -55,12 +43,7 @@ audio_alsa_make_source (int sampling_rate,
*
* Output samples will be in the range [-1,1].
*/
-class audio_alsa_source : public gr_sync_block {
- friend audio_alsa_source_sptr
- audio_alsa_make_source (int sampling_rate,
- const std::string device_name,
- bool ok_to_block);
-
+class audio_alsa_source : public audio_source {
// typedef for pointer to class work method
typedef int (audio_alsa_source::*work_t)(int noutput_items,
gr_vector_const_void_star &input_items,
@@ -88,11 +71,10 @@ class audio_alsa_source : public gr_sync_block {
void output_error_msg (const char *msg, int err);
void bail (const char *msg, int err) throw (std::runtime_error);
- protected:
+public:
audio_alsa_source (int sampling_rate, const std::string device_name,
bool ok_to_block);
- public:
~audio_alsa_source ();
bool check_topology (int ninputs, int noutputs);
diff --git a/gr-audio-alsa/gr-audio-alsa.conf b/gr-audio/lib/alsa/gr-audio-alsa.conf
index 5cec63e7a..5cec63e7a 100644
--- a/gr-audio-alsa/gr-audio-alsa.conf
+++ b/gr-audio/lib/alsa/gr-audio-alsa.conf
diff --git a/gr-audio-alsa/src/gri_alsa.cc b/gr-audio/lib/alsa/gri_alsa.cc
index d9fda0f7d..d9fda0f7d 100644
--- a/gr-audio-alsa/src/gri_alsa.cc
+++ b/gr-audio/lib/alsa/gri_alsa.cc
diff --git a/gr-audio-alsa/src/gri_alsa.h b/gr-audio/lib/alsa/gri_alsa.h
index 3d72fd950..3d72fd950 100644
--- a/gr-audio-alsa/src/gri_alsa.h
+++ b/gr-audio/lib/alsa/gri_alsa.h
diff --git a/gr-audio/lib/gr-audio.conf b/gr-audio/lib/gr-audio.conf
new file mode 100644
index 000000000..9a7007656
--- /dev/null
+++ b/gr-audio/lib/gr-audio.conf
@@ -0,0 +1,7 @@
+# This file contains system wide configuration data for GNU Radio.
+# You may override any setting on a per-user basis by editing
+# ~/.gnuradio/config.conf
+
+[audio]
+
+audio_module = auto
diff --git a/gr-audio/lib/gr_audio_registry.cc b/gr-audio/lib/gr_audio_registry.cc
new file mode 100644
index 000000000..c47db8289
--- /dev/null
+++ b/gr-audio/lib/gr_audio_registry.cc
@@ -0,0 +1,153 @@
+/*
+ * Copyright 2011 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "gr_audio_registry.h"
+#include <boost/foreach.hpp>
+#include <gr_prefs.h>
+#include <stdexcept>
+#include <vector>
+#include <iostream>
+
+/***********************************************************************
+ * Create registries
+ **********************************************************************/
+
+struct source_entry_t{
+ reg_prio_type prio;
+ std::string arch;
+ source_factory_t source;
+};
+
+static std::vector<source_entry_t> &get_source_registry(void){
+ static std::vector<source_entry_t> _registry;
+ return _registry;
+}
+
+struct sink_entry_t{
+ reg_prio_type prio;
+ std::string arch;
+ sink_factory_t sink;
+};
+
+static std::vector<sink_entry_t> &get_sink_registry(void){
+ static std::vector<sink_entry_t> _registry;
+ return _registry;
+}
+
+/***********************************************************************
+ * Register functions
+ **********************************************************************/
+void audio_register_source(
+ reg_prio_type prio, const std::string &arch, source_factory_t source
+){
+ source_entry_t entry;
+ entry.prio = prio;
+ entry.arch = arch;
+ entry.source = source;
+ get_source_registry().push_back(entry);
+}
+
+void audio_register_sink(
+ reg_prio_type prio, const std::string &arch, sink_factory_t sink
+){
+ sink_entry_t entry;
+ entry.prio = prio;
+ entry.arch = arch;
+ entry.sink = sink;
+ get_sink_registry().push_back(entry);
+}
+
+/***********************************************************************
+ * Factory functions
+ **********************************************************************/
+static std::string default_arch_name(void){
+ return gr_prefs::singleton()->get_string("audio", "audio_module", "auto");
+}
+
+static void do_arch_warning(const std::string &arch){
+ if (arch == "auto") return; //no warning when arch not specified
+ std::cerr << "Could not find audio architecture \"" << arch << "\" in registry." << std::endl;
+ std::cerr << " Defaulting to the first available architecture..." << std::endl;
+}
+
+audio_source::sptr audio_make_source(
+ int sampling_rate,
+ const std::string device_name,
+ bool ok_to_block
+){
+ if (get_source_registry().empty()){
+ throw std::runtime_error("no available audio source factories");
+ }
+
+ std::string arch = default_arch_name();
+ source_entry_t entry = get_source_registry().front();
+
+ BOOST_FOREACH(const source_entry_t &e, get_source_registry()){
+ if (e.prio > entry.prio) entry = e; //entry is highest prio
+ if (arch != e.arch) continue; //continue when no match
+ return e.source(sampling_rate, device_name, ok_to_block);
+ }
+ //std::cout << "Audio source arch: " << entry.name << std::endl;
+ return entry.source(sampling_rate, device_name, ok_to_block);
+}
+
+audio_sink::sptr audio_make_sink(
+ int sampling_rate,
+ const std::string device_name,
+ bool ok_to_block
+){
+ if (get_sink_registry().empty()){
+ throw std::runtime_error("no available audio sink factories");
+ }
+
+ std::string arch = default_arch_name();
+ sink_entry_t entry = get_sink_registry().front();
+
+ BOOST_FOREACH(const sink_entry_t &e, get_sink_registry()){
+ if (e.prio > entry.prio) entry = e; //entry is highest prio
+ if (arch != e.arch) continue; //continue when no match
+ return e.sink(sampling_rate, device_name, ok_to_block);
+ }
+ do_arch_warning(arch);
+ //std::cout << "Audio sink arch: " << entry.name << std::endl;
+ return entry.sink(sampling_rate, device_name, ok_to_block);
+}
+
+/***********************************************************************
+ * Default constructors
+ **********************************************************************/
+#include <gr_io_signature.h>
+
+audio_sink::audio_sink(
+ const std::string &name,
+ gr_io_signature_sptr insig,
+ gr_io_signature_sptr outsig
+):
+ gr_sync_block(name, insig, outsig)
+{}
+
+audio_source::audio_source(
+ const std::string &name,
+ gr_io_signature_sptr insig,
+ gr_io_signature_sptr outsig
+):
+ gr_sync_block(name, insig, outsig)
+{}
diff --git a/gr-audio/lib/gr_audio_registry.h b/gr-audio/lib/gr_audio_registry.h
new file mode 100644
index 000000000..ec341e95e
--- /dev/null
+++ b/gr-audio/lib/gr_audio_registry.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2011 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_GR_AUDIO_REGISTRY_H
+#define INCLUDED_GR_AUDIO_REGISTRY_H
+
+#include <gr_audio_sink.h>
+#include <gr_audio_source.h>
+#include <string>
+
+typedef audio_source::sptr(*source_factory_t)(int, const std::string &, bool);
+typedef audio_sink::sptr(*sink_factory_t)(int, const std::string &, bool);
+
+enum reg_prio_type{
+ REG_PRIO_LOW = 100,
+ REG_PRIO_MED = 200,
+ REG_PRIO_HIGH = 300
+};
+
+void audio_register_source(reg_prio_type prio, const std::string &arch, source_factory_t source);
+void audio_register_sink(reg_prio_type prio, const std::string &arch, sink_factory_t sink);
+
+#define AUDIO_REGISTER_FIXTURE(x) static struct x{x();}x;x::x()
+
+#define AUDIO_REGISTER_SOURCE(prio, arch) \
+ static audio_source::sptr arch##_source_fcn(int, const std::string &, bool); \
+ AUDIO_REGISTER_FIXTURE(arch##_source_reg){ \
+ audio_register_source(prio, #arch, &arch##_source_fcn); \
+ } static audio_source::sptr arch##_source_fcn
+
+#define AUDIO_REGISTER_SINK(prio, arch) \
+ static audio_sink::sptr arch##_sink_fcn(int, const std::string &, bool); \
+ AUDIO_REGISTER_FIXTURE(arch##_sink_reg){ \
+ audio_register_sink(prio, #arch, &arch##_sink_fcn); \
+ } static audio_sink::sptr arch##_sink_fcn
+
+#endif /* INCLUDED_GR_AUDIO_REGISTRY_H */
diff --git a/gr-audio-jack/src/audio_jack_sink.cc b/gr-audio/lib/jack/audio_jack_sink.cc
index f28fddc34..db365a1f8 100644
--- a/gr-audio-jack/src/audio_jack_sink.cc
+++ b/gr-audio/lib/jack/audio_jack_sink.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2005,2006,2010 Free Software Foundation, Inc.
+ * Copyright 2005-2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -24,6 +24,7 @@
#include "config.h"
#endif
+#include "gr_audio_registry.h"
#include <audio_jack_sink.h>
#include <gr_io_signature.h>
#include <gr_prefs.h>
@@ -36,6 +37,12 @@
#include <pthread.h>
#endif
+AUDIO_REGISTER_SINK(REG_PRIO_MED, jack)(
+ int sampling_rate, const std::string &device_name, bool ok_to_block
+){
+ return audio_sink::sptr(new audio_jack_sink(sampling_rate, device_name, ok_to_block));
+}
+
typedef jack_default_audio_sample_t sample_t;
@@ -84,17 +91,10 @@ jack_sink_process (jack_nframes_t nframes, void *arg)
// ----------------------------------------------------------------
-audio_jack_sink_sptr
-audio_jack_make_sink(int sampling_rate, const std::string dev, bool ok_to_block)
-{
- return gnuradio::get_initial_sptr(new audio_jack_sink (sampling_rate, dev,
- ok_to_block));
-}
-
audio_jack_sink::audio_jack_sink (int sampling_rate,
const std::string device_name,
bool ok_to_block)
- : gr_sync_block ("audio_jack_sink",
+ : audio_sink ("audio_jack_sink",
gr_make_io_signature (0, 0, 0),
gr_make_io_signature (0, 0, 0)),
d_sampling_rate (sampling_rate),
diff --git a/gr-audio-jack/src/audio_jack_sink.h b/gr-audio/lib/jack/audio_jack_sink.h
index ac74cfc37..a11863ee0 100644
--- a/gr-audio-jack/src/audio_jack_sink.h
+++ b/gr-audio/lib/jack/audio_jack_sink.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2005,2006 Free Software Foundation, Inc.
+ * Copyright 2005-2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -22,27 +22,12 @@
#ifndef INCLUDED_AUDIO_JACK_SINK_H
#define INCLUDED_AUDIO_JACK_SINK_H
-#include <gr_sync_block.h>
+#include <gr_audio_sink.h>
#include <string>
#include <jack/jack.h>
#include <jack/ringbuffer.h>
#include <stdexcept>
-class audio_jack_sink;
-typedef boost::shared_ptr<audio_jack_sink> audio_jack_sink_sptr;
-
-/*!
- * \brief make an JACK audio sink.
- *
- * \param sampling_rate sampling rate in Hz
- * \param device_name JACK device name, e.g., "gr_sink"
- * \param ok_to_block
- */
-audio_jack_sink_sptr
-audio_jack_make_sink (int sampling_rate,
- const std::string device_name = "",
- bool ok_to_block = true);
-
int jack_sink_process (jack_nframes_t nframes, void *arg);
/*!
@@ -52,9 +37,7 @@ int jack_sink_process (jack_nframes_t nframes, void *arg);
*
* Input samples must be in the range [-1,1].
*/
-class audio_jack_sink : public gr_sync_block {
- friend audio_jack_sink_sptr
- audio_jack_make_sink (int sampling_rate, const std::string device_name, bool ok_to_block);
+class audio_jack_sink : public audio_sink {
friend int jack_sink_process (jack_nframes_t nframes, void *arg);
@@ -81,10 +64,9 @@ class audio_jack_sink : public gr_sync_block {
void bail (const char *msg, int err) throw (std::runtime_error);
- protected:
+public:
audio_jack_sink (int sampling_rate, const std::string device_name, bool ok_to_block);
- public:
~audio_jack_sink ();
bool check_topology (int ninputs, int noutputs);
diff --git a/gr-audio-jack/src/audio_jack_source.cc b/gr-audio/lib/jack/audio_jack_source.cc
index a92e970f5..415c7f22b 100644
--- a/gr-audio-jack/src/audio_jack_source.cc
+++ b/gr-audio/lib/jack/audio_jack_source.cc
@@ -24,6 +24,7 @@
#include "config.h"
#endif
+#include "gr_audio_registry.h"
#include <audio_jack_source.h>
#include <gr_io_signature.h>
#include <gr_prefs.h>
@@ -36,6 +37,12 @@
#include <pthread.h>
#endif
+AUDIO_REGISTER_SOURCE(REG_PRIO_MED, jack)(
+ int sampling_rate, const std::string &device_name, bool ok_to_block
+){
+ return audio_source::sptr(new audio_jack_source(sampling_rate, device_name, ok_to_block));
+}
+
typedef jack_default_audio_sample_t sample_t;
@@ -85,16 +92,10 @@ jack_source_process (jack_nframes_t nframes, void *arg)
// ----------------------------------------------------------------
-audio_jack_source_sptr
-audio_jack_make_source (int sampling_rate, const std::string dev, bool ok_to_block)
-{
- return gnuradio::get_initial_sptr(new audio_jack_source (sampling_rate, dev, ok_to_block));
-}
-
audio_jack_source::audio_jack_source (int sampling_rate,
const std::string device_name,
bool ok_to_block)
- : gr_sync_block ("audio_jack_source",
+ : audio_source ("audio_jack_source",
gr_make_io_signature (0, 0, 0),
gr_make_io_signature (0, 0, 0)),
d_sampling_rate (sampling_rate),
diff --git a/gr-audio-jack/src/audio_jack_source.h b/gr-audio/lib/jack/audio_jack_source.h
index 8831a7363..858f34528 100644
--- a/gr-audio-jack/src/audio_jack_source.h
+++ b/gr-audio/lib/jack/audio_jack_source.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2005,2006 Free Software Foundation, Inc.
+ * Copyright 2005-2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -22,27 +22,12 @@
#ifndef INCLUDED_AUDIO_JACK_SOURCE_H
#define INCLUDED_AUDIO_JACK_SOURCE_H
-#include <gr_sync_block.h>
+#include <gr_audio_source.h>
#include <string>
#include <jack/jack.h>
#include <jack/ringbuffer.h>
#include <stdexcept>
-class audio_jack_source;
-typedef boost::shared_ptr<audio_jack_source> audio_jack_source_sptr;
-
-/*!
- * \brief make a JACK audio source.
- *
- * \param sampling_rate sampling rate in Hz
- * \param device_name JACK device name, e.g., "gr_source"
- * \param ok_to_block
- */
-audio_jack_source_sptr
-audio_jack_make_source (int sampling_rate,
- const std::string device_name = "",
- bool ok_to_block = true);
-
int jack_source_process (jack_nframes_t nframes, void *arg);
/*!
@@ -52,9 +37,7 @@ int jack_source_process (jack_nframes_t nframes, void *arg);
*
* Output samples will be in the range [-1,1].
*/
-class audio_jack_source : public gr_sync_block {
- friend audio_jack_source_sptr
- audio_jack_make_source (int sampling_rate, const std::string device_name, bool ok_to_block);
+class audio_jack_source : public audio_source {
friend int jack_source_process (jack_nframes_t nframes, void *arg);
@@ -81,10 +64,9 @@ class audio_jack_source : public gr_sync_block {
void bail (const char *msg, int err) throw (std::runtime_error);
- protected:
+public:
audio_jack_source (int sampling_rate, const std::string device_name, bool ok_to_block);
- public:
~audio_jack_source ();
bool check_topology (int ninputs, int noutputs);
diff --git a/gr-audio-jack/gr-audio-jack.conf b/gr-audio/lib/jack/gr-audio-jack.conf
index bdbc1fd1d..bdbc1fd1d 100644
--- a/gr-audio-jack/gr-audio-jack.conf
+++ b/gr-audio/lib/jack/gr-audio-jack.conf
diff --git a/gr-audio-jack/src/gri_jack.cc b/gr-audio/lib/jack/gri_jack.cc
index fef1c58a6..fef1c58a6 100644
--- a/gr-audio-jack/src/gri_jack.cc
+++ b/gr-audio/lib/jack/gri_jack.cc
diff --git a/gr-audio-jack/src/gri_jack.h b/gr-audio/lib/jack/gri_jack.h
index ddc0b744d..ddc0b744d 100644
--- a/gr-audio-jack/src/gri_jack.h
+++ b/gr-audio/lib/jack/gri_jack.h
diff --git a/gr-audio-oss/src/audio_oss_sink.cc b/gr-audio/lib/oss/audio_oss_sink.cc
index 8230ab9b6..4e9e7cd79 100644
--- a/gr-audio-oss/src/audio_oss_sink.cc
+++ b/gr-audio/lib/oss/audio_oss_sink.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004,2010 Free Software Foundation, Inc.
+ * Copyright 2004-2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -24,6 +24,7 @@
#include "config.h"
#endif
+#include "gr_audio_registry.h"
#include <audio_oss_sink.h>
#include <gr_io_signature.h>
#include <gr_prefs.h>
@@ -37,6 +38,11 @@
#include <iostream>
#include <stdexcept>
+AUDIO_REGISTER_SINK(REG_PRIO_LOW, oss)(
+ int sampling_rate, const std::string &device_name, bool ok_to_block
+){
+ return audio_sink::sptr(new audio_oss_sink(sampling_rate, device_name, ok_to_block));
+}
static std::string
default_device_name ()
@@ -44,16 +50,10 @@ default_device_name ()
return gr_prefs::singleton()->get_string("audio_oss", "default_output_device", "/dev/dsp");
}
-audio_oss_sink_sptr
-audio_oss_make_sink (int sampling_rate, const std::string dev, bool ok_to_block)
-{
- return gnuradio::get_initial_sptr(new audio_oss_sink (sampling_rate, dev, ok_to_block));
-}
-
audio_oss_sink::audio_oss_sink (int sampling_rate,
const std::string device_name,
bool ok_to_block)
- : gr_sync_block ("audio_oss_sink",
+ : audio_sink ("audio_oss_sink",
gr_make_io_signature (1, 2, sizeof (float)),
gr_make_io_signature (0, 0, 0)),
d_sampling_rate (sampling_rate),
diff --git a/gr-audio-oss/src/audio_oss_sink.h b/gr-audio/lib/oss/audio_oss_sink.h
index 052faac13..0d7280c2f 100644
--- a/gr-audio-oss/src/audio_oss_sink.h
+++ b/gr-audio/lib/oss/audio_oss_sink.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004 Free Software Foundation, Inc.
+ * Copyright 2004-2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -23,18 +23,9 @@
#ifndef INCLUDED_AUDIO_OSS_SINK_H
#define INCLUDED_AUDIO_OSS_SINK_H
-#include <gr_sync_block.h>
+#include <gr_audio_sink.h>
#include <string>
-
-class audio_oss_sink;
-typedef boost::shared_ptr<audio_oss_sink> audio_oss_sink_sptr;
-
-audio_oss_sink_sptr
-audio_oss_make_sink (int sampling_rate,
- const std::string dev = "",
- bool ok_to_block = true);
-
/*!
* \brief audio sink using OSS
*
@@ -42,9 +33,7 @@ audio_oss_make_sink (int sampling_rate,
* Input samples must be in the range [-1,1].
*/
-class audio_oss_sink : public gr_sync_block {
- friend audio_oss_sink_sptr
- audio_oss_make_sink (int sampling_rate, const std::string device_name, bool ok_to_block);
+class audio_oss_sink : public audio_sink {
int d_sampling_rate;
std::string d_device_name;
@@ -52,10 +41,9 @@ class audio_oss_sink : public gr_sync_block {
short *d_buffer;
int d_chunk_size;
- protected:
+public:
audio_oss_sink (int sampling_rate, const std::string device_name = "", bool ok_to_block = true);
- public:
~audio_oss_sink ();
int work (int noutput_items,
diff --git a/gr-audio-oss/src/audio_oss_source.cc b/gr-audio/lib/oss/audio_oss_source.cc
index fbb898f8c..b7d53931d 100644
--- a/gr-audio-oss/src/audio_oss_source.cc
+++ b/gr-audio/lib/oss/audio_oss_source.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004,2010 Free Software Foundation, Inc.
+ * Copyright 2004-2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -24,6 +24,7 @@
#include "config.h"
#endif
+#include "gr_audio_registry.h"
#include <audio_oss_source.h>
#include <gr_io_signature.h>
#include <gr_prefs.h>
@@ -37,6 +38,11 @@
#include <iostream>
#include <stdexcept>
+AUDIO_REGISTER_SOURCE(REG_PRIO_LOW, oss)(
+ int sampling_rate, const std::string &device_name, bool ok_to_block
+){
+ return audio_source::sptr(new audio_oss_source(sampling_rate, device_name, ok_to_block));
+}
static std::string
default_device_name ()
@@ -44,17 +50,10 @@ default_device_name ()
return gr_prefs::singleton()->get_string("audio_oss", "default_input_device", "/dev/dsp");
}
-audio_oss_source_sptr
-audio_oss_make_source (int sampling_rate, const std::string dev, bool ok_to_block)
-{
- return gnuradio::get_initial_sptr(new audio_oss_source (sampling_rate, dev, ok_to_block));
-}
-
-
audio_oss_source::audio_oss_source (int sampling_rate,
const std::string device_name,
bool ok_to_block)
- : gr_sync_block ("audio_oss_source",
+ : audio_source ("audio_oss_source",
gr_make_io_signature (0, 0, 0),
gr_make_io_signature (1, 2, sizeof (float))),
d_sampling_rate (sampling_rate),
diff --git a/gr-audio-oss/src/audio_oss_source.h b/gr-audio/lib/oss/audio_oss_source.h
index 22d4392e2..b20ef5c05 100644
--- a/gr-audio-oss/src/audio_oss_source.h
+++ b/gr-audio/lib/oss/audio_oss_source.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004,2006 Free Software Foundation, Inc.
+ * Copyright 2004-2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -23,18 +23,9 @@
#ifndef INCLUDED_AUDIO_OSS_SOURCE_H
#define INCLUDED_AUDIO_OSS_SOURCE_H
-#include <gr_sync_block.h>
+#include <gr_audio_source.h>
#include <string>
-
-class audio_oss_source;
-typedef boost::shared_ptr<audio_oss_source> audio_oss_source_sptr;
-
-audio_oss_source_sptr
-audio_oss_make_source (int sampling_rate,
- const std::string dev = "",
- bool ok_to_block = true);
-
/*!
* \brief audio source using OSS
*
@@ -42,9 +33,7 @@ audio_oss_make_source (int sampling_rate,
* Output samples will be in the range [-1,1].
*/
-class audio_oss_source : public gr_sync_block {
- friend audio_oss_source_sptr
- audio_oss_make_source (int sampling_rate, const std::string device_name, bool ok_to_block);
+class audio_oss_source : public audio_source {
int d_sampling_rate;
std::string d_device_name;
@@ -52,12 +41,11 @@ class audio_oss_source : public gr_sync_block {
short *d_buffer;
int d_chunk_size;
- protected:
+public:
audio_oss_source (int sampling_rate,
const std::string device_name = "",
bool ok_to_block = true);
- public:
~audio_oss_source ();
int work (int noutput_items,
diff --git a/gr-audio-oss/gr-audio-oss.conf b/gr-audio/lib/oss/gr-audio-oss.conf
index 6ea14d67e..6ea14d67e 100644
--- a/gr-audio-oss/gr-audio-oss.conf
+++ b/gr-audio/lib/oss/gr-audio-oss.conf
diff --git a/gr-audio-osx/src/audio_osx.h b/gr-audio/lib/osx/audio_osx.h
index 79e79e36c..79e79e36c 100644
--- a/gr-audio-osx/src/audio_osx.h
+++ b/gr-audio/lib/osx/audio_osx.h
diff --git a/gr-audio-osx/src/audio_osx_sink.cc b/gr-audio/lib/osx/audio_osx_sink.cc
index ec9b024e8..f7aeb54f8 100644
--- a/gr-audio-osx/src/audio_osx_sink.cc
+++ b/gr-audio/lib/osx/audio_osx_sink.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2006,2010 Free Software Foundation, Inc.
+ * Copyright 2006-2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio.
*
@@ -24,6 +24,7 @@
#include "config.h"
#endif
+#include "gr_audio_registry.h"
#include <audio_osx_sink.h>
#include <gr_io_signature.h>
#include <stdexcept>
@@ -31,12 +32,18 @@
#define _OSX_AU_DEBUG_ 0
+AUDIO_REGISTER_SINK(REG_PRIO_HIGH, osx)(
+ int sampling_rate, const std::string &device_name, bool ok_to_block
+){
+ return audio_sink::sptr(new audio_osx_sink(sampling_rate, device_name, ok_to_block));
+}
+
audio_osx_sink::audio_osx_sink (int sample_rate,
const std::string device_name,
bool do_block,
int channel_config,
int max_sample_count)
- : gr_sync_block ("audio_osx_sink",
+ : audio_sink ("audio_osx_sink",
gr_make_io_signature (0, 0, 0),
gr_make_io_signature (0, 0, 0)),
d_sample_rate (0.0), d_channel_config (0), d_n_channels (0),
@@ -260,20 +267,6 @@ audio_osx_sink::~audio_osx_sink ()
d_internal = 0;
}
-audio_osx_sink_sptr
-audio_osx_make_sink (int sampling_freq,
- const std::string dev,
- bool do_block,
- int channel_config,
- int max_sample_count)
-{
- return gnuradio::get_initial_sptr(new audio_osx_sink (sampling_freq,
- dev,
- do_block,
- channel_config,
- max_sample_count));
-}
-
int
audio_osx_sink::work (int noutput_items,
gr_vector_const_void_star &input_items,
diff --git a/gr-audio-osx/src/audio_osx_sink.h b/gr-audio/lib/osx/audio_osx_sink.h
index a1a56502c..13bd95d53 100644
--- a/gr-audio-osx/src/audio_osx_sink.h
+++ b/gr-audio/lib/osx/audio_osx_sink.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2006,2010 Free Software Foundation, Inc.
+ * Copyright 2006-2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio.
*
@@ -23,22 +23,12 @@
#ifndef INCLUDED_AUDIO_OSX_SINK_H
#define INCLUDED_AUDIO_OSX_SINK_H
-#include <gr_sync_block.h>
+#include <gr_audio_sink.h>
#include <string>
#include <list>
#include <AudioUnit/AudioUnit.h>
#include <circular_buffer.h>
-class audio_osx_sink;
-typedef boost::shared_ptr<audio_osx_sink> audio_osx_sink_sptr;
-
-audio_osx_sink_sptr
-audio_osx_make_sink (int sample_rate = 44100,
- const std::string device_name = "2",
- bool do_block = true,
- int channel_config = -1,
- int max_sample_count = -1);
-
/*!
* \brief audio sink using OSX
*
@@ -46,13 +36,7 @@ audio_osx_make_sink (int sample_rate = 44100,
* Input samples must be in the range [-1,1].
*/
-class audio_osx_sink : public gr_sync_block {
- friend audio_osx_sink_sptr
- audio_osx_make_sink (int sample_rate,
- const std::string device_name,
- bool do_block,
- int channel_config,
- int max_sample_count);
+class audio_osx_sink : public audio_sink {
Float64 d_sample_rate;
int d_channel_config;
@@ -66,14 +50,13 @@ class audio_osx_sink : public gr_sync_block {
// AudioUnits and Such
AudioUnit d_OutputAU;
-protected:
+public:
audio_osx_sink (int sample_rate = 44100,
const std::string device_name = "2",
bool do_block = true,
int channel_config = -1,
int max_sample_count = -1);
-public:
~audio_osx_sink ();
bool IsRunning ();
diff --git a/gr-audio-osx/src/audio_osx_source.cc b/gr-audio/lib/osx/audio_osx_source.cc
index 757e65a9e..e380156d6 100644
--- a/gr-audio-osx/src/audio_osx_source.cc
+++ b/gr-audio/lib/osx/audio_osx_source.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2006,2010 Free Software Foundation, Inc.
+ * Copyright 2006-2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio.
*
@@ -24,6 +24,7 @@
#include "config.h"
#endif
+#include "gr_audio_registry.h"
#include <audio_osx_source.h>
#include <gr_io_signature.h>
#include <stdexcept>
@@ -32,6 +33,12 @@
#define _OSX_AU_DEBUG_ 0
#define _OSX_DO_LISTENERS_ 0
+AUDIO_REGISTER_SOURCE(REG_PRIO_HIGH, osx)(
+ int sampling_rate, const std::string &device_name, bool ok_to_block
+){
+ return audio_source::sptr(new audio_osx_source(sampling_rate, device_name, ok_to_block));
+}
+
void PrintStreamDesc (AudioStreamBasicDescription *inDesc)
{
if (inDesc == NULL) {
@@ -58,7 +65,7 @@ audio_osx_source::audio_osx_source (int sample_rate,
bool do_block,
int channel_config,
int max_sample_count)
- : gr_sync_block ("audio_osx_source",
+ : audio_source ("audio_osx_source",
gr_make_io_signature (0, 0, 0),
gr_make_io_signature (0, 0, 0)),
d_deviceSampleRate (0.0), d_outputSampleRate (0.0),
@@ -607,20 +614,6 @@ audio_osx_source::~audio_osx_source ()
d_internal = 0;
}
-audio_osx_source_sptr
-audio_osx_make_source (int sampling_freq,
- const std::string device_name,
- bool do_block,
- int channel_config,
- int max_sample_count)
-{
- return gnuradio::get_initial_sptr(new audio_osx_source (sampling_freq,
- device_name,
- do_block,
- channel_config,
- max_sample_count));
-}
-
bool
audio_osx_source::check_topology (int ninputs, int noutputs)
{
diff --git a/gr-audio-osx/src/audio_osx_source.h b/gr-audio/lib/osx/audio_osx_source.h
index e8df47b16..754f0d928 100644
--- a/gr-audio-osx/src/audio_osx_source.h
+++ b/gr-audio/lib/osx/audio_osx_source.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2006,2010 Free Software Foundation, Inc.
+ * Copyright 2006-2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio.
*
@@ -23,22 +23,12 @@
#ifndef INCLUDED_AUDIO_OSX_SOURCE_H
#define INCLUDED_AUDIO_OSX_SOURCE_H
-#include <gr_sync_block.h>
+#include <gr_audio_source.h>
#include <string>
#include <AudioToolbox/AudioToolbox.h>
#include <AudioUnit/AudioUnit.h>
#include <circular_buffer.h>
-class audio_osx_source;
-typedef boost::shared_ptr<audio_osx_source> audio_osx_source_sptr;
-
-audio_osx_source_sptr
-audio_osx_make_source (int sample_rate = 44100,
- const std::string device_name = "",
- bool do_block = true,
- int channel_config = -1,
- int max_sample_count = -1);
-
/*!
* \brief audio source using OSX
*
@@ -47,12 +37,6 @@ audio_osx_make_source (int sample_rate = 44100,
*/
class audio_osx_source : public gr_sync_block {
- friend audio_osx_source_sptr
- audio_osx_make_source (int sample_rate,
- const std::string device_name,
- bool do_block,
- int channel_config,
- int max_sample_count);
Float64 d_deviceSampleRate, d_outputSampleRate;
int d_channel_config;
@@ -76,14 +60,13 @@ class audio_osx_source : public gr_sync_block {
AudioBufferList* d_OutputBuffer;
AudioConverterRef d_AudioConverter;
-protected:
+public:
audio_osx_source (int sample_rate = 44100,
const std::string device_name = "",
bool do_block = true,
int channel_config = -1,
int max_sample_count = -1);
-public:
~audio_osx_source ();
bool start ();
diff --git a/gr-audio-portaudio/src/audio_portaudio_sink.cc b/gr-audio/lib/portaudio/audio_portaudio_sink.cc
index 64e64ccf4..515cd04d9 100644
--- a/gr-audio-portaudio/src/audio_portaudio_sink.cc
+++ b/gr-audio/lib/portaudio/audio_portaudio_sink.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2006,2010 Free Software Foundation, Inc.
+ * Copyright 2006-2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -24,6 +24,7 @@
#include "config.h"
#endif
+#include "gr_audio_registry.h"
#include <audio_portaudio_sink.h>
#include <gr_io_signature.h>
#include <gr_prefs.h>
@@ -34,6 +35,12 @@
#include <gri_portaudio.h>
#include <string.h>
+AUDIO_REGISTER_SINK(REG_PRIO_MED, portaudio)(
+ int sampling_rate, const std::string &device_name, bool ok_to_block
+){
+ return audio_sink::sptr(new audio_portaudio_sink(sampling_rate, device_name, ok_to_block));
+}
+
//#define LOGGING 0 // define to 0 or 1
#define SAMPLE_FORMAT paFloat32
@@ -120,17 +127,10 @@ portaudio_sink_callback (const void *inputBuffer,
// ----------------------------------------------------------------
-audio_portaudio_sink_sptr
-audio_portaudio_make_sink (int sampling_rate, const std::string dev, bool ok_to_block)
-{
- return gnuradio::get_initial_sptr(new audio_portaudio_sink (sampling_rate,
- dev, ok_to_block));
-}
-
audio_portaudio_sink::audio_portaudio_sink(int sampling_rate,
const std::string device_name,
bool ok_to_block)
- : gr_sync_block ("audio_portaudio_sink",
+ : audio_sink ("audio_portaudio_sink",
gr_make_io_signature(0, 0, 0),
gr_make_io_signature(0, 0, 0)),
d_sampling_rate(sampling_rate),
diff --git a/gr-audio-portaudio/src/audio_portaudio_sink.h b/gr-audio/lib/portaudio/audio_portaudio_sink.h
index 71cbfcf9f..6426a32ac 100644
--- a/gr-audio-portaudio/src/audio_portaudio_sink.h
+++ b/gr-audio/lib/portaudio/audio_portaudio_sink.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2006 Free Software Foundation, Inc.
+ * Copyright 2006-2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -22,7 +22,7 @@
#ifndef INCLUDED_AUDIO_PORTAUDIO_SINK_H
#define INCLUDED_AUDIO_PORTAUDIO_SINK_H
-#include <gr_sync_block.h>
+#include <gr_audio_sink.h>
#include <gr_buffer.h>
#include <gruel/thread.h>
#include <string>
@@ -30,21 +30,6 @@
#include <stdexcept>
//#include <gri_logger.h>
-class audio_portaudio_sink;
-typedef boost::shared_ptr<audio_portaudio_sink> audio_portaudio_sink_sptr;
-
-/*!
- * \brief PORTAUDIO audio sink.
- *
- * \param sampling_rate sampling rate in Hz
- * \param device_name PORTAUDIO device name, e.g., "pa:"
- * \param ok_to_block true if it's ok for us to block
- */
-audio_portaudio_sink_sptr
-audio_portaudio_make_sink (int sampling_rate,
- const std::string device_name = "",
- bool ok_to_block = true);
-
PaStreamCallback portaudio_sink_callback;
@@ -53,11 +38,7 @@ PaStreamCallback portaudio_sink_callback;
*
* Input samples must be in the range [-1,1].
*/
-class audio_portaudio_sink : public gr_sync_block {
- friend audio_portaudio_sink_sptr
- audio_portaudio_make_sink (int sampling_rate,
- const std::string device_name,
- bool ok_to_block);
+class audio_portaudio_sink : public audio_sink {
friend PaStreamCallback portaudio_sink_callback;
@@ -88,11 +69,10 @@ class audio_portaudio_sink : public gr_sync_block {
void create_ringbuffer();
- protected:
+public:
audio_portaudio_sink (int sampling_rate, const std::string device_name,
bool ok_to_block);
- public:
~audio_portaudio_sink ();
bool check_topology (int ninputs, int noutputs);
diff --git a/gr-audio-portaudio/src/audio_portaudio_source.cc b/gr-audio/lib/portaudio/audio_portaudio_source.cc
index e508fda22..bdb8b3b3d 100644
--- a/gr-audio-portaudio/src/audio_portaudio_source.cc
+++ b/gr-audio/lib/portaudio/audio_portaudio_source.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2006,2010 Free Software Foundation, Inc.
+ * Copyright 2006-2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -24,6 +24,7 @@
#include "config.h"
#endif
+#include "gr_audio_registry.h"
#include <audio_portaudio_source.h>
#include <gr_io_signature.h>
#include <gr_prefs.h>
@@ -34,6 +35,12 @@
#include <gri_portaudio.h>
#include <string.h>
+AUDIO_REGISTER_SOURCE(REG_PRIO_MED, portaudio)(
+ int sampling_rate, const std::string &device_name, bool ok_to_block
+){
+ return audio_source::sptr(new audio_portaudio_source(sampling_rate, device_name, ok_to_block));
+}
+
//#define LOGGING 0 // define to 0 or 1
#define SAMPLE_FORMAT paFloat32
@@ -119,17 +126,10 @@ portaudio_source_callback (const void *inputBuffer,
// ----------------------------------------------------------------
-audio_portaudio_source_sptr
-audio_portaudio_make_source (int sampling_rate, const std::string dev, bool ok_to_block)
-{
- return gnuradio::get_initial_sptr(new audio_portaudio_source (sampling_rate,
- dev, ok_to_block));
-}
-
audio_portaudio_source::audio_portaudio_source(int sampling_rate,
const std::string device_name,
bool ok_to_block)
- : gr_sync_block ("audio_portaudio_source",
+ : audio_source ("audio_portaudio_source",
gr_make_io_signature(0, 0, 0),
gr_make_io_signature(0, 0, 0)),
d_sampling_rate(sampling_rate),
diff --git a/gr-audio-portaudio/src/audio_portaudio_source.h b/gr-audio/lib/portaudio/audio_portaudio_source.h
index 31e70a127..245b3410b 100644
--- a/gr-audio-portaudio/src/audio_portaudio_source.h
+++ b/gr-audio/lib/portaudio/audio_portaudio_source.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2006.2010 Free Software Foundation, Inc.
+ * Copyright 2006-2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -22,28 +22,13 @@
#ifndef INCLUDED_AUDIO_PORTAUDIO_SOURCE_H
#define INCLUDED_AUDIO_PORTAUDIO_SOURCE_H
-#include <gr_sync_block.h>
+#include <gr_audio_source.h>
#include <gr_buffer.h>
#include <gruel/thread.h>
#include <string>
#include <portaudio.h>
#include <stdexcept>
-class audio_portaudio_source;
-typedef boost::shared_ptr<audio_portaudio_source> audio_portaudio_source_sptr;
-
-/*!
- * \brief PORTAUDIO audio source.
- *
- * \param sampling_rate sampling rate in Hz
- * \param device_name PORTAUDIO device name, e.g., "pa:"
- * \param ok_to_block true if it's ok for us to block
- */
-audio_portaudio_source_sptr
-audio_portaudio_make_source (int sampling_rate,
- const std::string device_name = "",
- bool ok_to_block = true);
-
PaStreamCallback portaudio_source_callback;
@@ -52,11 +37,7 @@ PaStreamCallback portaudio_source_callback;
*
* Input samples must be in the range [-1,1].
*/
-class audio_portaudio_source : public gr_sync_block {
- friend audio_portaudio_source_sptr
- audio_portaudio_make_source (int sampling_rate,
- const std::string device_name,
- bool ok_to_block);
+class audio_portaudio_source : public audio_source {
friend PaStreamCallback portaudio_source_callback;
@@ -86,11 +67,10 @@ class audio_portaudio_source : public gr_sync_block {
void create_ringbuffer();
- protected:
+public:
audio_portaudio_source (int sampling_rate, const std::string device_name,
bool ok_to_block);
- public:
~audio_portaudio_source ();
bool check_topology (int ninputs, int noutputs);
diff --git a/gr-audio-portaudio/gr-audio-portaudio.conf b/gr-audio/lib/portaudio/gr-audio-portaudio.conf
index 0dd147443..0dd147443 100644
--- a/gr-audio-portaudio/gr-audio-portaudio.conf
+++ b/gr-audio/lib/portaudio/gr-audio-portaudio.conf
diff --git a/gr-audio-portaudio/src/gri_portaudio.cc b/gr-audio/lib/portaudio/gri_portaudio.cc
index faa472337..faa472337 100644
--- a/gr-audio-portaudio/src/gri_portaudio.cc
+++ b/gr-audio/lib/portaudio/gri_portaudio.cc
diff --git a/gr-audio-portaudio/src/gri_portaudio.h b/gr-audio/lib/portaudio/gri_portaudio.h
index 36191e25a..36191e25a 100644
--- a/gr-audio-portaudio/src/gri_portaudio.h
+++ b/gr-audio/lib/portaudio/gri_portaudio.h
diff --git a/gr-audio-windows/src/audio_windows_sink.cc b/gr-audio/lib/windows/audio_windows_sink.cc
index a47871954..e3f67a8f4 100644
--- a/gr-audio-windows/src/audio_windows_sink.cc
+++ b/gr-audio/lib/windows/audio_windows_sink.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
-* Copyright 2004,2010 Free Software Foundation, Inc.
+* Copyright 2004-2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -24,6 +24,7 @@
#include "config.h"
#endif
+#include "gr_audio_registry.h"
#include <audio_windows_sink.h>
#include <gr_io_signature.h>
#include <sys/types.h>
@@ -36,6 +37,12 @@
#include <string>
#include <sstream>
+AUDIO_REGISTER_SINK(REG_PRIO_HIGH, windows)(
+ int sampling_rate, const std::string &device_name, bool
+){
+ return audio_sink::sptr(new audio_windows_sink(sampling_rate, device_name));
+}
+
static const double CHUNK_TIME = 0.1; //0.001; // 100 ms
// FIXME these should query some kind of user preference
@@ -47,7 +54,7 @@ default_device_name ()
}
audio_windows_sink::audio_windows_sink (int sampling_freq, const std::string device_name)
- : gr_sync_block ("audio_windows_sink",
+ : audio_sink ("audio_windows_sink",
gr_make_io_signature (1, 2, sizeof (float)),
gr_make_io_signature (0, 0, 0)),
d_sampling_freq (sampling_freq),
@@ -78,13 +85,6 @@ audio_windows_sink::~audio_windows_sink ()
delete[]d_buffer;
}
-audio_windows_sink_sptr
-audio_windows_make_sink (int sampling_freq, const std::string dev)
-{
- return gnuradio::get_initial_sptr (new audio_windows_sink (sampling_freq, dev));
-}
-
-
int
audio_windows_sink::work (int noutput_items,
gr_vector_const_void_star & input_items,
diff --git a/gr-audio-windows/src/audio_windows_sink.h b/gr-audio/lib/windows/audio_windows_sink.h
index 2212ecf06..6819bd448 100644
--- a/gr-audio-windows/src/audio_windows_sink.h
+++ b/gr-audio/lib/windows/audio_windows_sink.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004 Free Software Foundation, Inc.
+ * Copyright 2004-2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -29,16 +29,9 @@
#include <windows.h>
#include <mmsystem.h>
-#include <gr_sync_block.h>
+#include <gr_audio_sink.h>
#include <string>
-
-class audio_windows_sink;
-typedef boost::shared_ptr <audio_windows_sink> audio_windows_sink_sptr;
-
-audio_windows_sink_sptr
-audio_windows_make_sink (int sampling_freq, const std::string dev = "");
-
/*!
* \brief audio sink using winmm mmsystem (win32 only)
*
@@ -46,12 +39,8 @@ audio_windows_make_sink (int sampling_freq, const std::string dev = "");
* Input samples must be in the range [-1,1].
*/
-class audio_windows_sink : public gr_sync_block
+class audio_windows_sink : public audio_sink
{
- friend
- audio_windows_sink_sptr
- audio_windows_make_sink (int sampling_freq, const std::string device_name);
-
int d_sampling_freq;
std::string d_device_name;
int d_fd;
@@ -65,13 +54,13 @@ class audio_windows_sink : public gr_sync_block
protected:
int
string_to_int (const std::string & s);
- audio_windows_sink (int sampling_freq, const std::string device_name = "");
int
open_waveout_device (void);
int
write_waveout (HPSTR lp_data, DWORD dw_data_size);
public:
+ audio_windows_sink (int sampling_freq, const std::string device_name = "");
~audio_windows_sink ();
int
diff --git a/gr-audio-windows/src/audio_windows_source.cc b/gr-audio/lib/windows/audio_windows_source.cc
index a88923afd..4b657a0e3 100644
--- a/gr-audio-windows/src/audio_windows_source.cc
+++ b/gr-audio/lib/windows/audio_windows_source.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004,2010 Free Software Foundation, Inc.
+ * Copyright 2004-2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -24,6 +24,7 @@
#include "config.h"
#endif
+#include "gr_audio_registry.h"
#include <audio_windows_source.h>
#include <gr_io_signature.h>
//include <sys/soundcard.h>
@@ -36,6 +37,11 @@
#include <iostream>
#include <stdexcept>
+AUDIO_REGISTER_SOURCE(REG_PRIO_HIGH, windows)(
+ int sampling_rate, const std::string &device_name, bool
+){
+ return audio_source::sptr(new audio_windows_source(sampling_rate, device_name));
+}
static const double CHUNK_TIME = 0.005; // 5 ms
@@ -48,7 +54,7 @@ default_device_name ()
}
audio_windows_source::audio_windows_source (int sampling_freq, const std::string device_name)
- : gr_sync_block ("audio_windows_source",
+ : audio_source ("audio_windows_source",
gr_make_io_signature (0, 0, 0),
gr_make_io_signature (1, 2, sizeof (float))),
d_sampling_freq (sampling_freq),
@@ -125,13 +131,6 @@ audio_windows_source::~audio_windows_source ()
*/
}
-audio_windows_source_sptr
-audio_windows_make_source (int sampling_freq, const std::string dev)
-{
- return gnuradio::get_initial_sptr (new audio_windows_source (sampling_freq, dev));
-}
-
-
int
audio_windows_source::work (int noutput_items,
gr_vector_const_void_star & input_items,
diff --git a/gr-audio-windows/src/audio_windows_source.h b/gr-audio/lib/windows/audio_windows_source.h
index caeda36b8..36311968d 100644
--- a/gr-audio-windows/src/audio_windows_source.h
+++ b/gr-audio/lib/windows/audio_windows_source.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004 Free Software Foundation, Inc.
+ * Copyright 2004-2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -23,16 +23,9 @@
#ifndef INCLUDED_AUDIO_WINDOWS_SOURCE_H
#define INCLUDED_AUDIO_WINDOWS_SOURCE_H
-#include <gr_sync_block.h>
+#include <gr_audio_source.h>
#include <string>
-
-class audio_windows_source;
-typedef boost::shared_ptr <audio_windows_source> audio_windows_source_sptr;
-
-audio_windows_source_sptr
-audio_windows_make_source (int sampling_freq, const std::string dev = "");
-
/*!
* \brief audio source using winmm mmsystem (win32 only)
*
@@ -40,12 +33,8 @@ audio_windows_make_source (int sampling_freq, const std::string dev = "");
* Output samples will be in the range [-1,1].
*/
-class audio_windows_source : public gr_sync_block
+class audio_windows_source : public audio_source
{
- friend
- audio_windows_source_sptr
- audio_windows_make_source (int sampling_freq,
- const std::string device_name);
int d_sampling_freq;
std::string d_device_name;
@@ -53,10 +42,9 @@ class audio_windows_source : public gr_sync_block
short *d_buffer;
int d_chunk_size;
-protected:
+public:
audio_windows_source (int sampling_freq, const std::string device_name = "");
-public:
~audio_windows_source ();
int
diff --git a/gr-audio/swig/.gitignore b/gr-audio/swig/.gitignore
new file mode 100644
index 000000000..7fd371091
--- /dev/null
+++ b/gr-audio/swig/.gitignore
@@ -0,0 +1,5 @@
+/audio_swig.cc
+/audio_swig.py
+/Makefile
+/Makefile.in
+/python
diff --git a/gr-audio-oss/src/Makefile.am b/gr-audio/swig/Makefile.am
index 2468958b2..d95e4c5d5 100644
--- a/gr-audio-oss/src/Makefile.am
+++ b/gr-audio/swig/Makefile.am
@@ -1,5 +1,5 @@
#
-# Copyright 2004,2005,2006,2008,2009,2010 Free Software Foundation, Inc.
+# Copyright 2011 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -17,54 +17,41 @@
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
-#
+#
include $(top_srcdir)/Makefile.common
include $(top_srcdir)/Makefile.swig
-TESTS =
-EXTRA_DIST += run_tests.in
-DISTCLEANFILES += run_tests
-
-AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
-
-
-# C/C++ headers get installed in ${prefix}/include/gnuradio
-grinclude_HEADERS = \
- audio_oss_sink.h \
- audio_oss_source.h
+AUDIO_CPPFLAGS = -I$(abs_top_srcdir)/gr-audio/include
-noinst_PYTHON = qa_oss.py
+AM_CPPFLAGS = \
+ $(STD_DEFINES_AND_INCLUDES) \
+ $(PYTHON_CPPFLAGS) \
+ $(AUDIO_CPPFLAGS) \
+ $(WITH_INCLUDES)
-lib_LTLIBRARIES = libgnuradio-audio-oss.la
+# ----------------------------------------------------------------
+# The SWIG library
-libgnuradio_audio_oss_la_SOURCES = \
- audio_oss_sink.cc \
- audio_oss_source.cc
-
-libgnuradio_audio_oss_la_LIBADD = \
- $(GNURADIO_CORE_LA) \
- $(OSS_LIBS)
-
-libgnuradio_audio_oss_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS)
-
-###################################
-# SWIG interface and library
-TOP_SWIG_IFILES = \
- audio_oss.i
+TOP_SWIG_IFILES = \
+ audio_swig.i
# Install so that they end up available as:
-# import gnuradio.audio_oss
+# import gnuradio.audio
# This ends up at:
-# ${prefix}/lib/python${python_version}/site-packages/gnuradio
-audio_oss_pythondir_category = \
- gnuradio
+# ${prefix}/lib/python${python_version}/site-packages/gnuradio/audio
+audio_swig_pythondir_category = \
+ gnuradio/audio
# additional libraries for linking with the SWIG-generated library
-audio_oss_la_swig_libadd = \
- libgnuradio-audio-oss.la
+audio_swig_la_swig_libadd = \
+ $(top_builddir)/gr-audio/lib/libgnuradio-audio.la
+
+# additional Python files to be installed along with the SWIG-generated one
+audio_swig_python = \
+ __init__.py
+# additional SWIG files to be installed
+audio_swig_swiginclude_headers =
-if PYTHON
-TESTS += run_tests
-endif
+audio_swig_swig_args = $(AUDIO_CPPFLAGS)
diff --git a/gr-audio-alsa/src/Makefile.swig.gen b/gr-audio/swig/Makefile.swig.gen
index c231a4784..7cdf04665 100644
--- a/gr-audio-alsa/src/Makefile.swig.gen
+++ b/gr-audio/swig/Makefile.swig.gen
@@ -1,6 +1,6 @@
# -*- Makefile -*-
#
-# Copyright 2009 Free Software Foundation, Inc.
+# Copyright 2011 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -20,37 +20,37 @@
# Boston, MA 02110-1301, USA.
#
-# Makefile.swig.gen for audio_alsa.i
+# Makefile.swig.gen for audio_swig.i
## Default install locations for these files:
##
## Default location for the Python directory is:
-## ${prefix}/lib/python${python_version}/site-packages/[category]/audio_alsa
+## ${prefix}/lib/python${python_version}/site-packages/[category]/audio_swig
## Default location for the Python exec directory is:
-## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/audio_alsa
+## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/audio_swig
##
## The following can be overloaded to change the install location, but
## this has to be done in the including Makefile.am -before-
## Makefile.swig is included.
-audio_alsa_pythondir_category ?= gnuradio/audio_alsa
-audio_alsa_pylibdir_category ?= $(audio_alsa_pythondir_category)
-audio_alsa_pythondir = $(pythondir)/$(audio_alsa_pythondir_category)
-audio_alsa_pylibdir = $(pyexecdir)/$(audio_alsa_pylibdir_category)
+audio_swig_pythondir_category ?= gnuradio/audio_swig
+audio_swig_pylibdir_category ?= $(audio_swig_pythondir_category)
+audio_swig_pythondir = $(pythondir)/$(audio_swig_pythondir_category)
+audio_swig_pylibdir = $(pyexecdir)/$(audio_swig_pylibdir_category)
# The .so libraries for the guile modules get installed whereever guile
# is installed, usually /usr/lib/guile/gnuradio/
# FIXME: determince whether these should be installed with gnuradio.
-audio_alsa_scmlibdir = $(libdir)
+audio_swig_scmlibdir = $(libdir)
# The scm files for the guile modules get installed where ever guile
-# is installed, usually /usr/share/guile/site/audio_alsa
+# is installed, usually /usr/share/guile/site/audio_swig
# FIXME: determince whether these should be installed with gnuradio.
-audio_alsa_scmdir = $(guiledir)
+audio_swig_scmdir = $(guiledir)
## SWIG headers are always installed into the same directory.
-audio_alsa_swigincludedir = $(swigincludedir)
+audio_swig_swigincludedir = $(swigincludedir)
## This is a template file for a "generated" Makefile addition (in
## this case, "Makefile.swig.gen"). By including the top-level
@@ -75,70 +75,70 @@ MOSTLYCLEANFILES += $(DEPDIR)/*.S*
## Makefile.am by setting the variable value there, then including
## Makefile.swig .
-audio_alsa_swiginclude_HEADERS = \
- audio_alsa.i \
- $(audio_alsa_swiginclude_headers)
+audio_swig_swiginclude_HEADERS = \
+ audio_swig.i \
+ $(audio_swig_swiginclude_headers)
if PYTHON
-audio_alsa_pylib_LTLIBRARIES = \
- _audio_alsa.la
+audio_swig_pylib_LTLIBRARIES = \
+ _audio_swig.la
-_audio_alsa_la_SOURCES = \
- python/audio_alsa.cc \
- $(audio_alsa_la_swig_sources)
+_audio_swig_la_SOURCES = \
+ python/audio_swig.cc \
+ $(audio_swig_la_swig_sources)
-audio_alsa_python_PYTHON = \
- audio_alsa.py \
- $(audio_alsa_python)
+audio_swig_python_PYTHON = \
+ audio_swig.py \
+ $(audio_swig_python)
-_audio_alsa_la_LIBADD = \
+_audio_swig_la_LIBADD = \
$(STD_SWIG_LA_LIB_ADD) \
- $(audio_alsa_la_swig_libadd)
+ $(audio_swig_la_swig_libadd)
-_audio_alsa_la_LDFLAGS = \
+_audio_swig_la_LDFLAGS = \
$(STD_SWIG_LA_LD_FLAGS) \
- $(audio_alsa_la_swig_ldflags)
+ $(audio_swig_la_swig_ldflags)
-_audio_alsa_la_CXXFLAGS = \
+_audio_swig_la_CXXFLAGS = \
$(STD_SWIG_CXX_FLAGS) \
-I$(top_builddir) \
- $(audio_alsa_la_swig_cxxflags)
+ $(audio_swig_la_swig_cxxflags)
-python/audio_alsa.cc: audio_alsa.py
-audio_alsa.py: audio_alsa.i
+python/audio_swig.cc: audio_swig.py
+audio_swig.py: audio_swig.i
# Include the python dependencies for this file
--include python/audio_alsa.d
+-include python/audio_swig.d
endif # end of if python
if GUILE
-audio_alsa_scmlib_LTLIBRARIES = \
- libguile-gnuradio-audio_alsa.la
-libguile_gnuradio_audio_alsa_la_SOURCES = \
- guile/audio_alsa.cc \
- $(audio_alsa_la_swig_sources)
-nobase_audio_alsa_scm_DATA = \
- gnuradio/audio_alsa.scm \
- gnuradio/audio_alsa-primitive.scm
-libguile_gnuradio_audio_alsa_la_LIBADD = \
+audio_swig_scmlib_LTLIBRARIES = \
+ libguile-gnuradio-audio_swig.la
+libguile_gnuradio_audio_swig_la_SOURCES = \
+ guile/audio_swig.cc \
+ $(audio_swig_la_swig_sources)
+nobase_audio_swig_scm_DATA = \
+ gnuradio/audio_swig.scm \
+ gnuradio/audio_swig-primitive.scm
+libguile_gnuradio_audio_swig_la_LIBADD = \
$(STD_SWIG_LA_LIB_ADD) \
- $(audio_alsa_la_swig_libadd)
-libguile_gnuradio_audio_alsa_la_LDFLAGS = \
+ $(audio_swig_la_swig_libadd)
+libguile_gnuradio_audio_swig_la_LDFLAGS = \
$(STD_SWIG_LA_LD_FLAGS) \
- $(audio_alsa_la_swig_ldflags)
-libguile_gnuradio_audio_alsa_la_CXXFLAGS = \
+ $(audio_swig_la_swig_ldflags)
+libguile_gnuradio_audio_swig_la_CXXFLAGS = \
$(STD_SWIG_CXX_FLAGS) \
-I$(top_builddir) \
- $(audio_alsa_la_swig_cxxflags)
+ $(audio_swig_la_swig_cxxflags)
-guile/audio_alsa.cc: gnuradio/audio_alsa.scm
-gnuradio/audio_alsa.scm: audio_alsa.i
-gnuradio/audio_alsa-primitive.scm: gnuradio/audio_alsa.scm
+guile/audio_swig.cc: gnuradio/audio_swig.scm
+gnuradio/audio_swig.scm: audio_swig.i
+gnuradio/audio_swig-primitive.scm: gnuradio/audio_swig.scm
# Include the guile dependencies for this file
--include guile/audio_alsa.d
+-include guile/audio_swig.d
endif # end of GUILE
diff --git a/gr-audio-windows/Makefile.am b/gr-audio/swig/__init__.py
index b3cecff96..23efda07e 100644
--- a/gr-audio-windows/Makefile.am
+++ b/gr-audio/swig/__init__.py
@@ -1,5 +1,5 @@
#
-# Copyright 2004 Free Software Foundation, Inc.
+# Copyright 2011 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -17,8 +17,6 @@
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
-#
-
-include $(top_srcdir)/Makefile.common
+#
-SUBDIRS = src
+from audio_swig import *
diff --git a/gr-audio/swig/audio_swig.i b/gr-audio/swig/audio_swig.i
new file mode 100644
index 000000000..612e96d23
--- /dev/null
+++ b/gr-audio/swig/audio_swig.i
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2011 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#define GR_AUDIO_API
+
+////////////////////////////////////////////////////////////////////////
+// Language independent exception handler
+////////////////////////////////////////////////////////////////////////
+%include exception.i
+
+%exception {
+ try {
+ $action
+ }
+ catch(std::exception &e) {
+ SWIG_exception(SWIG_RuntimeError, e.what());
+ }
+ catch(...) {
+ SWIG_exception(SWIG_RuntimeError, "Unknown exception");
+ }
+
+}
+
+////////////////////////////////////////////////////////////////////////
+// standard includes
+////////////////////////////////////////////////////////////////////////
+%include "gnuradio.i"
+
+////////////////////////////////////////////////////////////////////////
+// block headers
+////////////////////////////////////////////////////////////////////////
+%{
+#include <gr_audio_source.h>
+#include <gr_audio_sink.h>
+%}
+
+////////////////////////////////////////////////////////////////////////
+// block magic
+////////////////////////////////////////////////////////////////////////
+GR_SWIG_BLOCK_MAGIC(audio,source)
+%include <gr_audio_source.h>
+
+GR_SWIG_BLOCK_MAGIC(audio,sink)
+%include <gr_audio_sink.h>
diff --git a/gr-qtgui/src/lib/qtgui.h b/gr-qtgui/src/lib/qtgui.h
index 6edbca12c..9831697ac 100644
--- a/gr-qtgui/src/lib/qtgui.h
+++ b/gr-qtgui/src/lib/qtgui.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2008 Free Software Foundation, Inc.
+ * Copyright 2008,2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -23,30 +23,31 @@
#ifndef INCLUDED_QTGUI_H
#define INCLUDED_QTGUI_H
+#include <gruel/thread.h>
#include <qapplication.h>
#include "SpectrumGUIClass.h"
class qtgui_event : public QEvent
{
private:
- pthread_mutex_t *pmutex;
+ gruel::mutex &d_mutex;
public:
- qtgui_event(pthread_mutex_t *mut)
- : QEvent((QEvent::Type)(QEvent::User+101))
+ qtgui_event(gruel::mutex &mutex)
+ : QEvent((QEvent::Type)(QEvent::User+101)),
+ d_mutex(mutex)
{
- pmutex = mut;
+ //nop
}
void lock()
{
- pthread_mutex_lock(pmutex);
-
+ d_mutex.lock();
}
void unlock()
{
- pthread_mutex_unlock(pmutex);
+ d_mutex.unlock();
}
};
diff --git a/gr-qtgui/src/lib/qtgui_sink_c.cc b/gr-qtgui/src/lib/qtgui_sink_c.cc
index c12c451b0..05c7b28d5 100644
--- a/gr-qtgui/src/lib/qtgui_sink_c.cc
+++ b/gr-qtgui/src/lib/qtgui_sink_c.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2008,2009,2010 Free Software Foundation, Inc.
+ * Copyright 2008,2009,2010,2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -72,7 +72,6 @@ qtgui_sink_c::qtgui_sink_c (int fftsize, int wintype,
}
d_main_gui = NULL;
- pthread_mutex_init(&d_pmutex, NULL);
lock();
// Perform fftshift operation;
@@ -107,12 +106,12 @@ qtgui_sink_c::forecast(int noutput_items, gr_vector_int &ninput_items_required)
void qtgui_sink_c::lock()
{
- pthread_mutex_lock(&d_pmutex);
+ d_mutex.lock();
}
void qtgui_sink_c::unlock()
{
- pthread_mutex_unlock(&d_pmutex);
+ d_mutex.unlock();
}
@@ -151,7 +150,7 @@ qtgui_sink_c::initialize(const bool opengl)
set_update_time(0.1);
d_object = new qtgui_obj(d_qApplication);
- qApp->postEvent(d_object, new qtgui_event(&d_pmutex));
+ qApp->postEvent(d_object, new qtgui_event(d_mutex));
}
@@ -289,7 +288,7 @@ qtgui_sink_c::general_work (int noutput_items,
int j=0;
const gr_complex *in = (const gr_complex*)input_items[0];
- pthread_mutex_lock(&d_pmutex);
+ gruel::scoped_lock lock(d_mutex);
// Update the FFT size from the application
fftresize();
@@ -322,8 +321,6 @@ qtgui_sink_c::general_work (int noutput_items,
}
}
- pthread_mutex_unlock(&d_pmutex);
-
consume_each(j);
return j;
}
diff --git a/gr-qtgui/src/lib/qtgui_sink_c.h b/gr-qtgui/src/lib/qtgui_sink_c.h
index 9aee66503..bbf9983b0 100644
--- a/gr-qtgui/src/lib/qtgui_sink_c.h
+++ b/gr-qtgui/src/lib/qtgui_sink_c.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2008,2009 Free Software Foundation, Inc.
+ * Copyright 2008,2009,2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -76,7 +76,7 @@ private:
double d_bandwidth;
std::string d_name;
- pthread_mutex_t d_pmutex;
+ gruel::mutex d_mutex;
bool d_shift;
gri_fft_complex *d_fft;
diff --git a/gr-qtgui/src/lib/qtgui_sink_f.cc b/gr-qtgui/src/lib/qtgui_sink_f.cc
index ab4fd082d..984c2803c 100644
--- a/gr-qtgui/src/lib/qtgui_sink_f.cc
+++ b/gr-qtgui/src/lib/qtgui_sink_f.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2008,2009,2010 Free Software Foundation, Inc.
+ * Copyright 2008,2009,2010,2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -72,7 +72,6 @@ qtgui_sink_f::qtgui_sink_f (int fftsize, int wintype,
}
d_main_gui = NULL;
- pthread_mutex_init(&d_pmutex, NULL);
lock();
// Perform fftshift operation;
@@ -107,12 +106,12 @@ qtgui_sink_f::forecast(int noutput_items, gr_vector_int &ninput_items_required)
void qtgui_sink_f::lock()
{
- pthread_mutex_lock(&d_pmutex);
+ d_mutex.lock();
}
void qtgui_sink_f::unlock()
{
- pthread_mutex_unlock(&d_pmutex);
+ d_mutex.unlock();
}
void
@@ -146,7 +145,7 @@ qtgui_sink_f::initialize(const bool opengl)
set_update_time(0.1);
d_object = new qtgui_obj(d_qApplication);
- qApp->postEvent(d_object, new qtgui_event(&d_pmutex));
+ qApp->postEvent(d_object, new qtgui_event(d_mutex));
}
void
@@ -284,7 +283,7 @@ qtgui_sink_f::general_work (int noutput_items,
int j=0;
const float *in = (const float*)input_items[0];
- pthread_mutex_lock(&d_pmutex);
+ gruel::scoped_lock lock(d_mutex);
// Update the FFT size from the application
fftresize();
@@ -317,8 +316,6 @@ qtgui_sink_f::general_work (int noutput_items,
}
}
- pthread_mutex_unlock(&d_pmutex);
-
consume_each(j);
return j;
}
diff --git a/gr-qtgui/src/lib/qtgui_sink_f.h b/gr-qtgui/src/lib/qtgui_sink_f.h
index 0cac35d90..d80a6a198 100644
--- a/gr-qtgui/src/lib/qtgui_sink_f.h
+++ b/gr-qtgui/src/lib/qtgui_sink_f.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2008,2009 Free Software Foundation, Inc.
+ * Copyright 2008,2009,2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -74,7 +74,7 @@ private:
double d_bandwidth;
std::string d_name;
- pthread_mutex_t d_pmutex;
+ gruel::mutex d_mutex;
bool d_shift;
gri_fft_complex *d_fft;
diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i
index b814471b2..3ffcc7aea 100644
--- a/gr-uhd/swig/uhd_swig.i
+++ b/gr-uhd/swig/uhd_swig.i
@@ -66,6 +66,7 @@
%include <uhd/utils/pimpl.hpp>
+%ignore uhd::dict::operator[]; //ignore warnings about %extend
%include <uhd/types/dict.hpp>
%template(string_string_dict_t) uhd::dict<std::string, std::string>; //define after dict
@@ -88,6 +89,7 @@
%include <uhd/types/metadata.hpp>
+%ignore uhd::device::register_device; //causes compile to choke in MSVC
%include <uhd/device.hpp>
%template(device_addr_vector_t) std::vector<uhd::device_addr_t>;
diff --git a/gr-usrp/Makefile.am b/gr-usrp/Makefile.am
index 221a10816..be4035dd4 100644
--- a/gr-usrp/Makefile.am
+++ b/gr-usrp/Makefile.am
@@ -1,5 +1,5 @@
#
-# Copyright 2004 Free Software Foundation, Inc.
+# Copyright 2004,2011 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -27,5 +27,9 @@ EXTRA_DIST += \
SUBDIRS = src apps
+if PYTHON
+SUBDIRS += grc
+endif
+
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = gnuradio-usrp.pc
diff --git a/gr-usrp/grc/.gitignore b/gr-usrp/grc/.gitignore
new file mode 100644
index 000000000..b336cc7ce
--- /dev/null
+++ b/gr-usrp/grc/.gitignore
@@ -0,0 +1,2 @@
+/Makefile
+/Makefile.in
diff --git a/gr-audio-portaudio/Makefile.am b/gr-usrp/grc/Makefile.am
index 198d89f87..11a5f40dc 100644
--- a/gr-audio-portaudio/Makefile.am
+++ b/gr-usrp/grc/Makefile.am
@@ -1,5 +1,5 @@
#
-# Copyright 2006,2009 Free Software Foundation, Inc.
+# Copyright 2011 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -21,10 +21,22 @@
include $(top_srcdir)/Makefile.common
-SUBDIRS = src
+usrp_pythondir = $(pythondir)/grc_gnuradio/usrp
+usrp_python_PYTHON = \
+ __init__.py \
+ common.py \
+ dual_usrp.py \
+ simple_usrp.py
-pkgconfigdir = $(libdir)/pkgconfig
-dist_pkgconfig_DATA = gnuradio-audio-portaudio.pc
+dist_bin_SCRIPTS = usrp_probe
-etcdir = $(gr_prefsdir)
-dist_etc_DATA = gr-audio-portaudio.conf
+grcblocksdir = $(grc_blocksdir)
+dist_grcblocks_DATA = \
+ usrp_dual_sink_x.xml \
+ usrp_simple_sink_x.xml \
+ usrp_dual_source_x.xml \
+ usrp_simple_source_x.xml \
+ usrp_probe.xml
+
+ourdatadir = $(pkgdatadir)/grc/freedesktop
+dist_ourdata_DATA = gnuradio-usrp_probe.desktop
diff --git a/grc/grc_gnuradio/usrp/__init__.py b/gr-usrp/grc/__init__.py
index 1956bbd5b..1956bbd5b 100644
--- a/grc/grc_gnuradio/usrp/__init__.py
+++ b/gr-usrp/grc/__init__.py
diff --git a/grc/grc_gnuradio/usrp/common.py b/gr-usrp/grc/common.py
index 65c1e7e29..65c1e7e29 100644
--- a/grc/grc_gnuradio/usrp/common.py
+++ b/gr-usrp/grc/common.py
diff --git a/grc/grc_gnuradio/usrp/dual_usrp.py b/gr-usrp/grc/dual_usrp.py
index 66b76b2df..66b76b2df 100644
--- a/grc/grc_gnuradio/usrp/dual_usrp.py
+++ b/gr-usrp/grc/dual_usrp.py
diff --git a/grc/freedesktop/gnuradio-usrp_probe.desktop b/gr-usrp/grc/gnuradio-usrp_probe.desktop
index 136321994..136321994 100644
--- a/grc/freedesktop/gnuradio-usrp_probe.desktop
+++ b/gr-usrp/grc/gnuradio-usrp_probe.desktop
diff --git a/grc/grc_gnuradio/usrp/simple_usrp.py b/gr-usrp/grc/simple_usrp.py
index fb7a39570..fb7a39570 100644
--- a/grc/grc_gnuradio/usrp/simple_usrp.py
+++ b/gr-usrp/grc/simple_usrp.py
diff --git a/grc/blocks/usrp_dual_sink_x.xml b/gr-usrp/grc/usrp_dual_sink_x.xml
index 4539b62f9..babc124d0 100644
--- a/grc/blocks/usrp_dual_sink_x.xml
+++ b/gr-usrp/grc/usrp_dual_sink_x.xml
@@ -5,8 +5,9 @@
###################################################
-->
<block>
- <name>USRP Dual Sink</name>
+ <name>USRP1 Dual Sink</name>
<key>usrp_dual_sink_x</key>
+ <category>USRP</category>
<import>from grc_gnuradio import usrp as grc_usrp</import>
<make>grc_usrp.dual_sink_$(type.fcn)(which=$which)
self.$(id).set_interp_rate($interpolation)
diff --git a/grc/blocks/usrp_dual_source_x.xml b/gr-usrp/grc/usrp_dual_source_x.xml
index 07d3174bb..4e1fa81d8 100644
--- a/grc/blocks/usrp_dual_source_x.xml
+++ b/gr-usrp/grc/usrp_dual_source_x.xml
@@ -5,8 +5,9 @@
###################################################
-->
<block>
- <name>USRP Dual Source</name>
+ <name>USRP1 Dual Source</name>
<key>usrp_dual_source_x</key>
+ <category>USRP</category>
<import>from grc_gnuradio import usrp as grc_usrp</import>
<make>grc_usrp.dual_source_$(type.fcn)(
which=$which,
diff --git a/grc/scripts/usrp_probe b/gr-usrp/grc/usrp_probe
index d2e92e753..d2e92e753 100755
--- a/grc/scripts/usrp_probe
+++ b/gr-usrp/grc/usrp_probe
diff --git a/grc/blocks/usrp_probe.xml b/gr-usrp/grc/usrp_probe.xml
index ee207c28d..ee207c28d 100644
--- a/grc/blocks/usrp_probe.xml
+++ b/gr-usrp/grc/usrp_probe.xml
diff --git a/grc/blocks/usrp_simple_sink_x.xml b/gr-usrp/grc/usrp_simple_sink_x.xml
index b52cd4880..e52b5f047 100644
--- a/grc/blocks/usrp_simple_sink_x.xml
+++ b/gr-usrp/grc/usrp_simple_sink_x.xml
@@ -5,8 +5,9 @@
###################################################
-->
<block>
- <name>USRP Sink</name>
+ <name>USRP1 Sink</name>
<key>usrp_simple_sink_x</key>
+ <category>USRP</category>
<import>from grc_gnuradio import usrp as grc_usrp</import>
<make>grc_usrp.simple_sink_$(type.fcn)(which=$which, side=$side)
self.$(id).set_interp_rate($interpolation)
diff --git a/grc/blocks/usrp_simple_source_x.xml b/gr-usrp/grc/usrp_simple_source_x.xml
index 7fcc7a22c..a79c78c20 100644
--- a/grc/blocks/usrp_simple_source_x.xml
+++ b/gr-usrp/grc/usrp_simple_source_x.xml
@@ -5,8 +5,9 @@
###################################################
-->
<block>
- <name>USRP Source</name>
+ <name>USRP1 Source</name>
<key>usrp_simple_source_x</key>
+ <category>USRP</category>
<import>from grc_gnuradio import usrp as grc_usrp</import>
<make>grc_usrp.simple_source_$(type.fcn)(which=$which, side=$side, rx_ant=$rx_ant#if $hb_filters() then ', no_hb=True' else ''#)
#if $format()
diff --git a/gr-usrp2/Makefile.am b/gr-usrp2/Makefile.am
index 2a0fbe203..f6120884a 100644
--- a/gr-usrp2/Makefile.am
+++ b/gr-usrp2/Makefile.am
@@ -1,5 +1,5 @@
#
-# Copyright 2001,2006,2008,2009 Free Software Foundation, Inc.
+# Copyright 2001,2006,2008,2009,2011 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -23,5 +23,9 @@ include $(top_srcdir)/Makefile.common
SUBDIRS = src
+if PYTHON
+SUBDIRS += grc
+endif
+
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = gnuradio-usrp2.pc
diff --git a/gr-usrp2/grc/.gitignore b/gr-usrp2/grc/.gitignore
new file mode 100644
index 000000000..b336cc7ce
--- /dev/null
+++ b/gr-usrp2/grc/.gitignore
@@ -0,0 +1,2 @@
+/Makefile
+/Makefile.in
diff --git a/gr-audio-alsa/Makefile.am b/gr-usrp2/grc/Makefile.am
index 5bd92b0ff..2502bf363 100644
--- a/gr-audio-alsa/Makefile.am
+++ b/gr-usrp2/grc/Makefile.am
@@ -1,5 +1,5 @@
#
-# Copyright 2004,2006,2009 Free Software Foundation, Inc.
+# Copyright 2011 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -21,10 +21,13 @@
include $(top_srcdir)/Makefile.common
-SUBDIRS = src
+dist_bin_SCRIPTS = usrp2_probe
-pkgconfigdir = $(libdir)/pkgconfig
-dist_pkgconfig_DATA = gnuradio-audio-alsa.pc
+grcblocksdir = $(grc_blocksdir)
+dist_grcblocks_DATA = \
+ usrp2_probe.xml \
+ usrp2_source_xxxx.xml \
+ usrp2_sink_xxxx.xml
-etcdir = $(gr_prefsdir)
-dist_etc_DATA = gr-audio-alsa.conf
+ourdatadir = $(pkgdatadir)/grc/freedesktop
+dist_ourdata_DATA = gnuradio-usrp2_probe.desktop
diff --git a/grc/freedesktop/gnuradio-usrp2_probe.desktop b/gr-usrp2/grc/gnuradio-usrp2_probe.desktop
index c71a092b1..c71a092b1 100644
--- a/grc/freedesktop/gnuradio-usrp2_probe.desktop
+++ b/gr-usrp2/grc/gnuradio-usrp2_probe.desktop
diff --git a/grc/scripts/usrp2_probe b/gr-usrp2/grc/usrp2_probe
index 38c8f655c..38c8f655c 100755
--- a/grc/scripts/usrp2_probe
+++ b/gr-usrp2/grc/usrp2_probe
diff --git a/grc/blocks/usrp2_probe.xml b/gr-usrp2/grc/usrp2_probe.xml
index cc3f9c2fd..cc3f9c2fd 100644
--- a/grc/blocks/usrp2_probe.xml
+++ b/gr-usrp2/grc/usrp2_probe.xml
diff --git a/grc/blocks/usrp2_sink_xxxx.xml b/gr-usrp2/grc/usrp2_sink_xxxx.xml
index f9fb25361..74995da99 100644
--- a/grc/blocks/usrp2_sink_xxxx.xml
+++ b/gr-usrp2/grc/usrp2_sink_xxxx.xml
@@ -8,6 +8,7 @@
<block>
<name>USRP2 Sink</name>
<key>usrp2_sink_xxxx</key>
+ <category>USRP</category>
<import>from gnuradio import usrp2</import>
<make>#if not $interface() and not $mac_addr()
usrp2.sink_$(type.fcn)()
diff --git a/grc/blocks/usrp2_source_xxxx.xml b/gr-usrp2/grc/usrp2_source_xxxx.xml
index 584199798..a23c5bc5c 100644
--- a/grc/blocks/usrp2_source_xxxx.xml
+++ b/gr-usrp2/grc/usrp2_source_xxxx.xml
@@ -8,6 +8,7 @@
<block>
<name>USRP2 Source</name>
<key>usrp2_source_xxxx</key>
+ <category>USRP</category>
<import>from gnuradio import usrp2</import>
<make>#if not $interface() and not $mac_addr()
usrp2.source_$(type.fcn)()
diff --git a/gr-utils/src/python/gr_filter_design.py b/gr-utils/src/python/gr_filter_design.py
index bf83cf69f..56ca84d78 100755
--- a/gr-utils/src/python/gr_filter_design.py
+++ b/gr-utils/src/python/gr_filter_design.py
@@ -24,7 +24,7 @@ except ImportError:
raise SystemExit, 1
try:
- from pyqt_filter import Ui_MainWindow
+ from gnuradio.pyqt_filter import Ui_MainWindow
except ImportError:
print "Could not import from pyqt_filter. Please build with \"pyuic4 pyqt_filter.ui -o pyqt_filter.py\""
raise SystemExit, 1
diff --git a/grc/Makefile.am b/grc/Makefile.am
index 330777bb7..c36786281 100644
--- a/grc/Makefile.am
+++ b/grc/Makefile.am
@@ -1,5 +1,5 @@
#
-# Copyright 2008,2009,2010 Free Software Foundation, Inc.
+# Copyright 2008-2011 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -25,16 +25,12 @@ if PYTHON
SUBDIRS = \
base \
blocks \
+ freedesktop \
grc_gnuradio \
gui \
python \
scripts
-## append freedesktop to the list of subdirs when xdg utils are present
-if XDG_UTILS
-SUBDIRS += freedesktop
-endif
-
ourpythondir = $(pkgpythondir)/grc
ourpython_PYTHON = __init__.py
diff --git a/grc/blocks/Makefile.am b/grc/blocks/Makefile.am
index 18420a013..9b5bda298 100644
--- a/grc/blocks/Makefile.am
+++ b/grc/blocks/Makefile.am
@@ -24,8 +24,6 @@ include $(top_srcdir)/Makefile.common
ourdatadir = $(grc_blocksdir)
dist_ourdata_DATA = \
block_tree.xml \
- audio_sink.xml \
- audio_source.xml \
band_pass_filter.xml \
band_reject_filter.xml \
blks2_am_demod_cf.xml \
@@ -212,14 +210,6 @@ dist_ourdata_DATA = \
trellis_siso_f.xml \
trellis_viterbi_combined_xx.xml \
trellis_viterbi_x.xml \
- usrp2_probe.xml \
- usrp2_sink_xxxx.xml \
- usrp2_source_xxxx.xml \
- usrp_dual_sink_x.xml \
- usrp_dual_source_x.xml \
- usrp_probe.xml \
- usrp_simple_sink_x.xml \
- usrp_simple_source_x.xml \
variable.xml \
variable_check_box.xml \
variable_chooser.xml \
diff --git a/grc/blocks/block_tree.xml b/grc/blocks/block_tree.xml
index 610a88102..466fb05ea 100644
--- a/grc/blocks/block_tree.xml
+++ b/grc/blocks/block_tree.xml
@@ -18,7 +18,6 @@
<block>gr_file_source</block>
<block>blks2_tcp_source</block>
<block>gr_udp_source</block>
- <block>audio_source</block>
<block>gr_wavfile_source</block>
<block>gr_message_source</block>
<block>pad_source</block>
@@ -32,7 +31,6 @@
<block>gr_file_sink</block>
<block>blks2_tcp_sink</block>
<block>gr_udp_sink</block>
- <block>audio_sink</block>
<block>gr_wavfile_sink</block>
<block>gr_message_sink</block>
<block>pad_sink</block>
@@ -274,15 +272,6 @@
<block>probe_function</block>
</cat>
<cat>
- <name>USRP</name>
- <block>usrp_simple_source_x</block>
- <block>usrp_simple_sink_x</block>
- <block>usrp_dual_source_x</block>
- <block>usrp_dual_sink_x</block>
- <block>usrp2_source_xxxx</block>
- <block>usrp2_sink_xxxx</block>
- </cat>
- <cat>
<name>Variables</name>
<block>variable</block>
<block>variable_slider</block>
diff --git a/grc/freedesktop/Makefile.am b/grc/freedesktop/Makefile.am
index dd7411bbb..f89a344f7 100644
--- a/grc/freedesktop/Makefile.am
+++ b/grc/freedesktop/Makefile.am
@@ -1,5 +1,5 @@
#
-# Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
+# Copyright 2008-2011 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -29,9 +29,7 @@ dist_ourdata_DATA = \
grc-icon-48.png \
grc-icon-32.png \
gnuradio-grc.xml \
- gnuradio-grc.desktop \
- gnuradio-usrp2_probe.desktop \
- gnuradio-usrp_probe.desktop
+ gnuradio-grc.desktop
pkglibexecdir = $(libexecdir)/$(PACKAGE)
dist_pkglibexec_SCRIPTS = grc_setup_freedesktop
@@ -42,6 +40,7 @@ grc_setup_freedesktop: $(srcdir)/grc_setup_freedesktop.in Makefile
EXTRA_DIST += $(srcdir)/grc_setup_freedesktop.in
BUILT_SOURCES += grc_setup_freedesktop
+if XDG_UTILS
install-data-hook:
@printf "\n*** GRC Post-Install Message ***\
\nTo install icons, mime type, and menu items\
@@ -53,3 +52,4 @@ uninstall-hook:
\nTo uninstall icons, mime type, and menu items\
\nfor a freedesktop.org system (Gnome/KDE/Xfce):\
\n >>> sudo $(pkglibexecdir)/grc_setup_freedesktop uninstall\n\n"
+endif
diff --git a/grc/freedesktop/grc_setup_freedesktop.in b/grc/freedesktop/grc_setup_freedesktop.in
index ab4ce82ef..1e3546197 100644
--- a/grc/freedesktop/grc_setup_freedesktop.in
+++ b/grc/freedesktop/grc_setup_freedesktop.in
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
+# Copyright 2008-2011 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -28,7 +28,6 @@
##################################################
ICON_SIZES="32 48 64 128 256"
-MENU_ITEMS="grc usrp2_probe usrp_probe"
if [ -n "$2" ]; then
SRCDIR="$2"
else
@@ -49,9 +48,7 @@ case "$1" in
echo "Install mime type"
xdg-mime install ${SRCDIR}/gnuradio-grc.xml
echo "Install menu items"
- for menu_item in ${MENU_ITEMS}; do \
- xdg-desktop-menu install ${SRCDIR}/gnuradio-${menu_item}.desktop; \
- done
+ xdg-desktop-menu install ${SRCDIR}/*.desktop
echo "Done!"
echo ""
;;
@@ -68,9 +65,7 @@ case "$1" in
echo "Uninstall mime type"
xdg-mime uninstall ${SRCDIR}/gnuradio-grc.xml
echo "Uninstall menu items"
- for menu_item in ${MENU_ITEMS}; do \
- xdg-desktop-menu uninstall gnuradio-${menu_item}.desktop; \
- done
+ xdg-desktop-menu uninstall `ls ${SRCDIR}/*.desktop | xargs -n1 basename`
echo "Done!"
echo ""
;;
diff --git a/grc/grc_gnuradio/Makefile.am b/grc/grc_gnuradio/Makefile.am
index 63bb72822..9187a01e0 100644
--- a/grc/grc_gnuradio/Makefile.am
+++ b/grc/grc_gnuradio/Makefile.am
@@ -1,5 +1,5 @@
#
-# Copyright 2008 Free Software Foundation, Inc.
+# Copyright 2008-2011 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -36,13 +36,6 @@ blks2_python_PYTHON = \
blks2/tcp.py \
blks2/variable_sink.py
-usrp_pythondir = $(grc_gnuradio_prefix)/usrp
-usrp_python_PYTHON = \
- usrp/__init__.py \
- usrp/common.py \
- usrp/dual_usrp.py \
- usrp/simple_usrp.py
-
wxgui_pythondir = $(grc_gnuradio_prefix)/wxgui
wxgui_python_PYTHON = \
wxgui/__init__.py \
diff --git a/grc/gui/ActionHandler.py b/grc/gui/ActionHandler.py
index 108e23a23..350b297bb 100644
--- a/grc/gui/ActionHandler.py
+++ b/grc/gui/ActionHandler.py
@@ -1,5 +1,5 @@
"""
-Copyright 2007, 2008, 2009 Free Software Foundation, Inc.
+Copyright 2007, 2008, 2009, 2011 Free Software Foundation, Inc.
This file is part of GNU Radio
GNU Radio Companion is free software; you can redistribute it and/or
@@ -282,7 +282,7 @@ class ActionHandler:
# Gen/Exec/Stop
##################################################
elif action == Actions.FLOW_GRAPH_GEN:
- if not self.get_page().get_pid():
+ if not self.get_page().get_proc():
if not self.get_page().get_saved() or not self.get_page().get_file_path():
Actions.FLOW_GRAPH_SAVE() #only save if file path missing or not saved
if self.get_page().get_saved() and self.get_page().get_file_path():
@@ -293,14 +293,14 @@ class ActionHandler:
except Exception,e: Messages.send_fail_gen(e)
else: self.generator = None
elif action == Actions.FLOW_GRAPH_EXEC:
- if not self.get_page().get_pid():
+ if not self.get_page().get_proc():
Actions.FLOW_GRAPH_GEN()
if self.get_page().get_saved() and self.get_page().get_file_path():
ExecFlowGraphThread(self)
elif action == Actions.FLOW_GRAPH_KILL:
- if self.get_page().get_pid():
- try: os.kill(self.get_page().get_pid(), signal.SIGKILL)
- except: print "could not kill pid: %s"%self.get_page().get_pid()
+ if self.get_page().get_proc():
+ try: self.get_page().get_proc().kill()
+ except: print "could not kill process: %d"%self.get_page().get_proc().pid
elif action == Actions.PAGE_CHANGE: #pass and run the global actions
pass
else: print '!!! Action "%s" not handled !!!'%action
@@ -340,10 +340,10 @@ class ActionHandler:
Update the exec and stop buttons.
Lock and unlock the mutex for race conditions with exec flow graph threads.
"""
- sensitive = self.get_flow_graph().is_valid() and not self.get_page().get_pid()
+ sensitive = self.get_flow_graph().is_valid() and not self.get_page().get_proc()
Actions.FLOW_GRAPH_GEN.set_sensitive(sensitive)
Actions.FLOW_GRAPH_EXEC.set_sensitive(sensitive)
- Actions.FLOW_GRAPH_KILL.set_sensitive(self.get_page().get_pid() != None)
+ Actions.FLOW_GRAPH_KILL.set_sensitive(self.get_page().get_proc() != None)
class ExecFlowGraphThread(Thread):
"""Execute the flow graph as a new process and wait on it to finish."""
@@ -362,7 +362,7 @@ class ExecFlowGraphThread(Thread):
#get the popen
try:
self.p = self.page.get_generator().get_popen()
- self.page.set_pid(self.p.pid)
+ self.page.set_proc(self.p)
#update
self.update_exec_stop()
self.start()
@@ -385,5 +385,5 @@ class ExecFlowGraphThread(Thread):
def done(self):
"""Perform end of execution tasks."""
Messages.send_end_exec()
- self.page.set_pid(None)
+ self.page.set_proc(None)
self.update_exec_stop()
diff --git a/grc/gui/MainWindow.py b/grc/gui/MainWindow.py
index 9fcbe2a6c..2f761df1f 100644
--- a/grc/gui/MainWindow.py
+++ b/grc/gui/MainWindow.py
@@ -1,5 +1,5 @@
"""
-Copyright 2008, 2009 Free Software Foundation, Inc.
+Copyright 2008, 2009, 2011 Free Software Foundation, Inc.
This file is part of GNU Radio
GNU Radio Companion is free software; you can redistribute it and/or
@@ -216,7 +216,7 @@ class MainWindow(gtk.Window):
"""
if not self.page_to_be_closed: self.page_to_be_closed = self.get_page()
#show the page if it has an executing flow graph or is unsaved
- if self.page_to_be_closed.get_pid() or not self.page_to_be_closed.get_saved():
+ if self.page_to_be_closed.get_proc() or not self.page_to_be_closed.get_saved():
self._set_page(self.page_to_be_closed)
#unsaved? ask the user
if not self.page_to_be_closed.get_saved() and self._save_changes():
@@ -225,7 +225,7 @@ class MainWindow(gtk.Window):
self.page_to_be_closed = None #set the page to be closed back to None
return
#stop the flow graph if executing
- if self.page_to_be_closed.get_pid(): Actions.FLOW_GRAPH_KILL()
+ if self.page_to_be_closed.get_proc(): Actions.FLOW_GRAPH_KILL()
#remove the page
self.notebook.remove_page(self.notebook.page_num(self.page_to_be_closed))
if ensure and self.notebook.get_n_pages() == 0: self.new_page() #no pages, make a new one
diff --git a/grc/gui/NotebookPage.py b/grc/gui/NotebookPage.py
index fddfeaf5f..86b6f1513 100644
--- a/grc/gui/NotebookPage.py
+++ b/grc/gui/NotebookPage.py
@@ -1,5 +1,5 @@
"""
-Copyright 2008, 2009 Free Software Foundation, Inc.
+Copyright 2008, 2009, 2011 Free Software Foundation, Inc.
This file is part of GNU Radio
GNU Radio Companion is free software; you can redistribute it and/or
@@ -40,7 +40,7 @@ class NotebookPage(gtk.HBox):
@param file_path path to a flow graph file
"""
self._flow_graph = flow_graph
- self.set_pid(None)
+ self.set_proc(None)
#import the file
self.main_window = main_window
self.set_file_path(file_path)
@@ -119,19 +119,19 @@ class NotebookPage(gtk.HBox):
"""
return self.tab
- def get_pid(self):
+ def get_proc(self):
"""
- Get the pid for the flow graph.
- @return the pid number
+ Get the subprocess for the flow graph.
+ @return the subprocess object
"""
- return self.pid
+ return self.process
- def set_pid(self, pid):
+ def set_proc(self, process):
"""
- Set the pid number.
- @param pid the new pid number
+ Set the subprocess object.
+ @param process the new subprocess
"""
- self.pid = pid
+ self.process = process
def get_flow_graph(self):
"""
diff --git a/grc/scripts/Makefile.am b/grc/scripts/Makefile.am
index 9019ec5cc..84e2759dc 100644
--- a/grc/scripts/Makefile.am
+++ b/grc/scripts/Makefile.am
@@ -1,5 +1,5 @@
#
-# Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
+# Copyright 2008-2011 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -21,4 +21,4 @@
include $(top_srcdir)/Makefile.common
-dist_bin_SCRIPTS = gnuradio-companion usrp2_probe usrp_probe
+dist_bin_SCRIPTS = gnuradio-companion
diff --git a/gruel/src/include/gruel/thread.h b/gruel/src/include/gruel/thread.h
index d72e5520c..5a8ab1876 100644
--- a/gruel/src/include/gruel/thread.h
+++ b/gruel/src/include/gruel/thread.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2009,2010 Free Software Foundation, Inc.
+ * Copyright 2009,2010,2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -21,21 +21,17 @@
#ifndef INCLUDED_THREAD_H
#define INCLUDED_THREAD_H
-#include <boost/thread.hpp>
-#include <boost/date_time/posix_time/posix_time.hpp>
+#include <boost/thread/thread.hpp>
+#include <boost/thread/mutex.hpp>
+#include <boost/thread/locks.hpp>
+#include <boost/thread/condition_variable.hpp>
namespace gruel {
typedef boost::thread thread;
typedef boost::mutex mutex;
- typedef boost::unique_lock<boost::mutex> scoped_lock;
+ typedef boost::mutex::scoped_lock scoped_lock;
typedef boost::condition_variable condition_variable;
- typedef boost::posix_time::time_duration duration;
-
- /*!
- * Returns absolute time 'secs' into the future
- */
- boost::system_time get_new_timeout(double secs);
} /* namespace gruel */
diff --git a/gruel/src/lib/Makefile.am b/gruel/src/lib/Makefile.am
index b9b35ae10..f37ab27a1 100644
--- a/gruel/src/lib/Makefile.am
+++ b/gruel/src/lib/Makefile.am
@@ -45,7 +45,6 @@ MSG_LIB = msg/libmsg.la
libgruel_la_SOURCES = \
realtime.cc \
sys_pri.cc \
- thread.cc \
thread_body_wrapper.cc \
thread_group.cc
diff --git a/gruel/src/lib/thread.cc b/gruel/src/lib/thread.cc
deleted file mode 100644
index d8f77b506..000000000
--- a/gruel/src/lib/thread.cc
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2010 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <gruel/thread.h>
-
-namespace gruel {
-
- boost::system_time
- get_new_timeout(double secs)
- {
- return boost::get_system_time() + boost::posix_time::milliseconds(long(secs*1e3));
- }
-
-}
diff --git a/usrp2/host/lib/control.cc b/usrp2/host/lib/control.cc
index 33a95c078..3b5533eb8 100644
--- a/usrp2/host/lib/control.cc
+++ b/usrp2/host/lib/control.cc
@@ -27,6 +27,9 @@
#include <iostream>
#include <gruel/thread.h>
+#include <boost/date_time/posix_time/posix_time.hpp>
+namespace pt = boost::posix_time;
+
namespace usrp2 {
pending_reply::pending_reply(unsigned int rid, void *buffer, size_t len)
@@ -44,10 +47,9 @@ namespace usrp2 {
pending_reply::wait_for_completion(double secs)
{
gruel::scoped_lock l(d_mutex);
- boost::system_time to(gruel::get_new_timeout(secs));
while (!d_complete) {
- if (!d_cond.timed_wait(l, to))
+ if (!d_cond.timed_wait(l, pt::milliseconds(long(secs*1e3))))
return 0; // timed out
}
diff --git a/volk/lib/.gitignore b/volk/lib/.gitignore
index 0f17543ab..6a5fde28f 100644
--- a/volk/lib/.gitignore
+++ b/volk/lib/.gitignore
@@ -20,3 +20,4 @@
/volk_proccpu_sim.c
/volk_runtime.c
/test_all
+/testqa
diff --git a/volk/orc/.gitignore b/volk/orc/.gitignore
new file mode 100644
index 000000000..b336cc7ce
--- /dev/null
+++ b/volk/orc/.gitignore
@@ -0,0 +1,2 @@
+/Makefile
+/Makefile.in