summaryrefslogtreecommitdiff
path: root/gr-audio
diff options
context:
space:
mode:
Diffstat (limited to 'gr-audio')
-rw-r--r--gr-audio/CMakeLists.txt102
-rw-r--r--gr-audio/Makefile.am2
-rw-r--r--gr-audio/doc/.gitignore2
-rw-r--r--gr-audio/doc/CMakeLists.txt23
-rw-r--r--gr-audio/doc/Makefile.am27
-rw-r--r--gr-audio/doc/README.audio20
-rw-r--r--gr-audio/doc/audio.dox51
-rw-r--r--gr-audio/examples/c++/CMakeLists.txt23
-rw-r--r--gr-audio/examples/python/CMakeLists.txt37
-rw-r--r--gr-audio/grc/CMakeLists.txt22
-rw-r--r--gr-audio/grc/audio_sink.xml1
-rw-r--r--gr-audio/grc/audio_source.xml1
-rw-r--r--gr-audio/include/CMakeLists.txt29
-rw-r--r--gr-audio/include/gr_audio_sink.h13
-rw-r--r--gr-audio/include/gr_audio_source.h13
-rw-r--r--gr-audio/lib/CMakeLists.txt160
-rw-r--r--gr-audio/lib/alsa/audio_alsa_sink.h1
-rw-r--r--gr-audio/lib/alsa/audio_alsa_source.h1
-rw-r--r--gr-audio/lib/jack/audio_jack_sink.h1
-rw-r--r--gr-audio/lib/jack/audio_jack_source.h1
-rw-r--r--gr-audio/lib/oss/audio_oss_sink.h1
-rw-r--r--gr-audio/lib/oss/audio_oss_source.h1
-rw-r--r--gr-audio/lib/osx/audio_osx_sink.h1
-rw-r--r--gr-audio/lib/osx/audio_osx_source.h1
-rw-r--r--gr-audio/lib/portaudio/audio_portaudio_sink.h3
-rw-r--r--gr-audio/lib/portaudio/audio_portaudio_source.h3
-rw-r--r--gr-audio/lib/windows/audio_windows_sink.h1
-rw-r--r--gr-audio/lib/windows/audio_windows_source.h1
-rw-r--r--gr-audio/swig/CMakeLists.txt51
-rw-r--r--gr-audio/swig/Makefile.swig.gen4
30 files changed, 592 insertions, 5 deletions
diff --git a/gr-audio/CMakeLists.txt b/gr-audio/CMakeLists.txt
new file mode 100644
index 000000000..7038b9b0f
--- /dev/null
+++ b/gr-audio/CMakeLists.txt
@@ -0,0 +1,102 @@
+# 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.
+
+########################################################################
+# Setup dependencies
+########################################################################
+include(GrBoost)
+
+########################################################################
+# Register component
+########################################################################
+include(GrComponent)
+GR_REGISTER_COMPONENT("gr-audio" ENABLE_GR_AUDIO
+ Boost_FOUND
+ ENABLE_GR_CORE
+)
+
+GR_SET_GLOBAL(GR_AUDIO_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include)
+
+########################################################################
+# Begin conditional configuration
+########################################################################
+if(ENABLE_GR_AUDIO)
+
+########################################################################
+# Setup CPack components
+########################################################################
+include(GrPackage)
+CPACK_SET(CPACK_COMPONENT_GROUP_AUDIO_DESCRIPTION "GNU Radio Audio Blocks")
+
+CPACK_COMPONENT("audio_runtime"
+ GROUP "Audio"
+ DISPLAY_NAME "Runtime"
+ DESCRIPTION "Runtime"
+ DEPENDS "core_runtime"
+)
+
+CPACK_COMPONENT("audio_devel"
+ GROUP "Audio"
+ DISPLAY_NAME "Development"
+ DESCRIPTION "C++ headers, package config, import libraries"
+ DEPENDS "core_devel"
+)
+
+CPACK_COMPONENT("audio_python"
+ GROUP "Audio"
+ DISPLAY_NAME "Python"
+ DESCRIPTION "Python modules for runtime; GRC xml files"
+ DEPENDS "core_python;audio_runtime"
+)
+
+CPACK_COMPONENT("audio_swig"
+ GROUP "Audio"
+ DISPLAY_NAME "SWIG"
+ DESCRIPTION "SWIG development .i files"
+ DEPENDS "core_swig;audio_python;audio_devel"
+)
+
+########################################################################
+# Add subdirectories
+########################################################################
+add_subdirectory(include)
+add_subdirectory(lib)
+add_subdirectory(examples/c++)
+add_subdirectory(doc)
+if(ENABLE_PYTHON)
+ add_subdirectory(swig)
+ add_subdirectory(grc)
+ add_subdirectory(examples/python)
+endif(ENABLE_PYTHON)
+
+########################################################################
+# Create Pkg Config File
+########################################################################
+configure_file(
+ ${CMAKE_CURRENT_SOURCE_DIR}/gnuradio-audio.pc.in
+ ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-audio.pc
+@ONLY)
+
+install(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-audio.pc
+ DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
+ COMPONENT "audio_devel"
+)
+
+endif(ENABLE_GR_AUDIO)
diff --git a/gr-audio/Makefile.am b/gr-audio/Makefile.am
index cde1702f2..da4106c23 100644
--- a/gr-audio/Makefile.am
+++ b/gr-audio/Makefile.am
@@ -21,7 +21,7 @@
include $(top_srcdir)/Makefile.common
-SUBDIRS = include lib examples
+SUBDIRS = include lib examples doc
if PYTHON
SUBDIRS += grc swig
diff --git a/gr-audio/doc/.gitignore b/gr-audio/doc/.gitignore
new file mode 100644
index 000000000..b336cc7ce
--- /dev/null
+++ b/gr-audio/doc/.gitignore
@@ -0,0 +1,2 @@
+/Makefile
+/Makefile.in
diff --git a/gr-audio/doc/CMakeLists.txt b/gr-audio/doc/CMakeLists.txt
new file mode 100644
index 000000000..f4e6c4a07
--- /dev/null
+++ b/gr-audio/doc/CMakeLists.txt
@@ -0,0 +1,23 @@
+# 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.
+
+install(
+ FILES README.audio
+ DESTINATION ${GR_PKG_DOC_DIR}
+)
diff --git a/gr-audio/doc/Makefile.am b/gr-audio/doc/Makefile.am
new file mode 100644
index 000000000..959a9044f
--- /dev/null
+++ b/gr-audio/doc/Makefile.am
@@ -0,0 +1,27 @@
+#
+# 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
+
+SUBDIRS =
+
+dist_gr_doc_DATA = \
+ README.audio
diff --git a/gr-audio/doc/README.audio b/gr-audio/doc/README.audio
new file mode 100644
index 000000000..ebd0fe5d7
--- /dev/null
+++ b/gr-audio/doc/README.audio
@@ -0,0 +1,20 @@
+This is the gr-audio package. This package includes all of the
+supported audio interfaces, including:
+ - alsa
+ - oss
+ - jack
+ - portaudio
+ - osx
+ - windows
+
+Typically, the audio package will auto-detect the proper driver to use
+based on the system it is run on. Import this package with:
+
+ from gnuradio import audio
+
+See the Doxygen documentation for details about the blocks available
+in this package. A quick listing of the details can be found in Python
+after importing by using:
+
+ help(audio)
+
diff --git a/gr-audio/doc/audio.dox b/gr-audio/doc/audio.dox
new file mode 100644
index 000000000..3a0cb5e48
--- /dev/null
+++ b/gr-audio/doc/audio.dox
@@ -0,0 +1,51 @@
+/*! \page page_audio Audio Interface
+
+\section Introduction
+
+This is the gr-audio package. This package includes all of the
+supported audio interfaces, including:
+
+\li alsa
+\li oss
+\li jack
+\li portaudio
+\li osx
+\li windows
+
+\code
+ from gnuradio import audio
+\endcode
+
+See the Doxygen documentation for details about the blocks available
+in this package. The relevant blocks are listed in the \ref audio_blk group.
+
+A quick listing of the details can be found in Python after importing
+by using:
+
+\code
+ help(digital)
+\endcode
+
+
+\section Usage
+For an audio source, a typical OptionParser option and it's use looks
+like:
+
+\code
+ parser.add_option("-O", "--audio-output", type="string", default="",
+ help="pcm device name. E.g., hw:0,0 or surround51 or /dev/dsp")
+ audio_rate = 32e3
+ audio_sink = audio.sink (int (audio_rate), options.audio_output)
+\endcode
+
+Similarly, an audio sink would have a typical OptionParser option and
+its use would look like:
+
+\code
+ parser.add_option("-I", "--audio-input", type="string", default="",
+ help="pcm input device name. E.g., hw:0,0 or /dev/dsp")
+ audio_rate = 32e3
+ audio_source = audio.source(int(audio_rate), audio_input)
+\endcode
+
+*/
diff --git a/gr-audio/examples/c++/CMakeLists.txt b/gr-audio/examples/c++/CMakeLists.txt
new file mode 100644
index 000000000..38490cce8
--- /dev/null
+++ b/gr-audio/examples/c++/CMakeLists.txt
@@ -0,0 +1,23 @@
+# 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_directories(${GR_AUDIO_INCLUDE_DIRS})
+include_directories(${GNURADIO_CORE_INCLUDE_DIRS})
+add_executable(dial_tone dial_tone.cc)
+target_link_libraries(dial_tone gnuradio-audio)
diff --git a/gr-audio/examples/python/CMakeLists.txt b/gr-audio/examples/python/CMakeLists.txt
new file mode 100644
index 000000000..86ba86ac0
--- /dev/null
+++ b/gr-audio/examples/python/CMakeLists.txt
@@ -0,0 +1,37 @@
+# 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(GrPython)
+
+GR_PYTHON_INSTALL(PROGRAMS
+ audio_copy.py
+ audio_fft.py
+ audio_play.py
+ audio_to_file.py
+ dial_tone.py
+ dial_tone_daemon.py
+ dial_tone_wav.py
+ mono_tone.py
+ multi_tone.py
+ noise.py
+ spectrum_inversion.py
+ test_resampler.py
+ DESTINATION ${GR_PKG_DATA_DIR}/examples/audio
+ COMPONENT "audio_python"
+)
diff --git a/gr-audio/grc/CMakeLists.txt b/gr-audio/grc/CMakeLists.txt
new file mode 100644
index 000000000..a077f7fb4
--- /dev/null
+++ b/gr-audio/grc/CMakeLists.txt
@@ -0,0 +1,22 @@
+# 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.
+
+########################################################################
+file(GLOB xml_files "*.xml")
+install(FILES ${xml_files} DESTINATION ${GRC_BLOCKS_DIR} COMPONENT "audio_python")
diff --git a/gr-audio/grc/audio_sink.xml b/gr-audio/grc/audio_sink.xml
index 26e199d61..4a88a7fa2 100644
--- a/gr-audio/grc/audio_sink.xml
+++ b/gr-audio/grc/audio_sink.xml
@@ -8,6 +8,7 @@
<name>Audio Sink</name>
<key>audio_sink</key>
<category>Sinks</category>
+ <throttle>1</throttle>
<import>from gnuradio import audio</import>
<make>audio.sink($samp_rate, $device_name, $ok_to_block)</make>
<param>
diff --git a/gr-audio/grc/audio_source.xml b/gr-audio/grc/audio_source.xml
index 59b375244..d56e9153a 100644
--- a/gr-audio/grc/audio_source.xml
+++ b/gr-audio/grc/audio_source.xml
@@ -8,6 +8,7 @@
<name>Audio Source</name>
<key>audio_source</key>
<category>Sources</category>
+ <throttle>1</throttle>
<import>from gnuradio import audio</import>
<make>audio.source($samp_rate, $device_name, $ok_to_block)</make>
<param>
diff --git a/gr-audio/include/CMakeLists.txt b/gr-audio/include/CMakeLists.txt
new file mode 100644
index 000000000..6db55e92c
--- /dev/null
+++ b/gr-audio/include/CMakeLists.txt
@@ -0,0 +1,29 @@
+# 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.
+
+########################################################################
+# Install header files
+########################################################################
+install(FILES
+ gr_audio_api.h
+ gr_audio_source.h
+ gr_audio_sink.h
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio
+ COMPONENT "audio_devel"
+)
diff --git a/gr-audio/include/gr_audio_sink.h b/gr-audio/include/gr_audio_sink.h
index ca3b15a37..ec064b64b 100644
--- a/gr-audio/include/gr_audio_sink.h
+++ b/gr-audio/include/gr_audio_sink.h
@@ -25,6 +25,19 @@
#include <gr_audio_api.h>
#include <gr_sync_block.h>
+/*!
+ * \brief Creates a sink from an audio device.
+ * \ingroup audio_blk
+ *
+ * Creates a sink from an audio device at a specified
+ * sample_rate. The specific audio device to use can be specified as
+ * the device_name parameter. Typical choices are:
+ * \li pulse
+ * \li hw:0,0
+ * \li plughw:0,0
+ * \li surround51
+ * \li /dev/dsp
+ */
class GR_AUDIO_API audio_sink : virtual public gr_sync_block{
public:
typedef boost::shared_ptr<audio_sink> sptr;
diff --git a/gr-audio/include/gr_audio_source.h b/gr-audio/include/gr_audio_source.h
index b8ae2ca5f..eca22e3eb 100644
--- a/gr-audio/include/gr_audio_source.h
+++ b/gr-audio/include/gr_audio_source.h
@@ -25,6 +25,19 @@
#include <gr_audio_api.h>
#include <gr_sync_block.h>
+/*!
+ * \brief Creates a source from an audio device.
+ * \ingroup audio_blk
+ *
+ * Creates a source from an audio device at a specified
+ * sample_rate. The specific audio device to use can be specified as
+ * the device_name parameter. Typical choices are:
+ * \li pulse
+ * \li hw:0,0
+ * \li plughw:0,0
+ * \li surround51
+ * \li /dev/dsp
+ */
class GR_AUDIO_API audio_source : virtual public gr_sync_block{
public:
typedef boost::shared_ptr<audio_source> sptr;
diff --git a/gr-audio/lib/CMakeLists.txt b/gr-audio/lib/CMakeLists.txt
new file mode 100644
index 000000000..214f045be
--- /dev/null
+++ b/gr-audio/lib/CMakeLists.txt
@@ -0,0 +1,160 @@
+# 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.
+
+########################################################################
+# Setup the include and linker paths
+########################################################################
+include_directories(
+ ${GNURADIO_CORE_INCLUDE_DIRS}
+ ${GR_AUDIO_INCLUDE_DIRS}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+)
+
+include_directories(${Boost_INCLUDE_DIRS})
+link_directories(${Boost_LIBRARY_DIRS})
+
+list(APPEND gr_audio_libs gnuradio-core ${Boost_LIBRARIES})
+list(APPEND gr_audio_sources gr_audio_registry.cc)
+list(APPEND gr_audio_confs ${CMAKE_CURRENT_SOURCE_DIR}/gr-audio.conf)
+
+########################################################################
+## ALSA Support
+########################################################################
+find_package(ALSA)
+
+if(ALSA_FOUND)
+
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/alsa ${ALSA_INCLUDE_DIRS})
+ list(APPEND gr_audio_libs ${ALSA_LIBRARIES})
+ list(APPEND gr_audio_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/alsa/gri_alsa.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/alsa/audio_alsa_source.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/alsa/audio_alsa_sink.cc
+ )
+ list(APPEND gr_audio_confs ${CMAKE_CURRENT_SOURCE_DIR}/alsa/gr-audio-alsa.conf)
+
+endif(ALSA_FOUND)
+
+########################################################################
+## OSS Support
+########################################################################
+find_package(OSS)
+
+if(OSS_FOUND)
+
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/oss ${OSS_INCLUDE_DIRS})
+ list(APPEND gr_audio_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/oss/audio_oss_source.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/oss/audio_oss_sink.cc
+ )
+ list(APPEND gr_audio_confs ${CMAKE_CURRENT_SOURCE_DIR}/oss/gr-audio-oss.conf)
+
+endif(OSS_FOUND)
+
+
+########################################################################
+## Jack Support
+########################################################################
+find_package(Jack)
+
+if(JACK_FOUND)
+
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/jack ${JACK_INCLUDE_DIRS})
+ list(APPEND gr_audio_libs ${JACK_LIBRARIES})
+ add_definitions(${JACK_DEFINITIONS})
+ list(APPEND gr_audio_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/jack/gri_jack.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/jack/audio_jack_source.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/jack/audio_jack_sink.cc
+ )
+ list(APPEND gr_audio_confs ${CMAKE_CURRENT_SOURCE_DIR}/jack/gr-audio-jack.conf)
+
+endif(JACK_FOUND)
+
+########################################################################
+## OSX Support
+########################################################################
+include(CheckIncludeFileCXX)
+CHECK_INCLUDE_FILE_CXX(AudioUnit/AudioUnit.h AUDIO_UNIT_H)
+CHECK_INCLUDE_FILE_CXX(AudioToolbox/AudioToolbox.h AUDIO_TOOLBOX_H)
+
+if(AUDIO_UNIT_H AND AUDIO_TOOLBOX_H)
+
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/osx)
+ list(APPEND gr_audio_libs
+ "-framework AudioUnit"
+ "-framework CoreAudio"
+ "-framework AudioToolbox"
+ "-framework Carbon"
+ )
+ list(APPEND gr_audio_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/osx/audio_osx_source.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/osx/audio_osx_sink.cc
+ )
+
+endif(AUDIO_UNIT_H AND AUDIO_TOOLBOX_H)
+
+########################################################################
+## PortAudio Support
+########################################################################
+find_package(Portaudio)
+
+if(PORTAUDIO_FOUND)
+
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/portaudio ${PORTAUDIO_INCLUDE_DIRS})
+ list(APPEND gr_audio_libs ${PORTAUDIO_LIBRARIES})
+ add_definitions(${PORTAUDIO_DEFINITIONS})
+ list(APPEND gr_audio_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/portaudio/gri_portaudio.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/portaudio/audio_portaudio_source.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/portaudio/audio_portaudio_sink.cc
+ )
+ list(APPEND gr_audio_confs ${CMAKE_CURRENT_SOURCE_DIR}/portaudio/gr-audio-portaudio.conf)
+
+endif(PORTAUDIO_FOUND)
+
+########################################################################
+## Windows Support
+########################################################################
+if(WIN32)
+
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/windows)
+ list(APPEND gr_audio_libs winmm.lib)
+ list(APPEND gr_audio_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/windows/audio_windows_source.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/windows/audio_windows_sink.cc
+ )
+
+endif(WIN32)
+
+########################################################################
+# Setup library
+########################################################################
+add_library(gnuradio-audio SHARED ${gr_audio_sources})
+target_link_libraries(gnuradio-audio ${gr_audio_libs})
+set_target_properties(gnuradio-audio PROPERTIES DEFINE_SYMBOL "gnuradio_audio_EXPORTS")
+set_target_properties(gnuradio-audio PROPERTIES SOVERSION ${LIBVER})
+
+install(TARGETS gnuradio-audio
+ LIBRARY DESTINATION ${GR_LIBRARY_DIR} COMPONENT "audio_runtime" # .so/.dylib file
+ ARCHIVE DESTINATION ${GR_LIBRARY_DIR} COMPONENT "audio_devel" # .lib file
+ RUNTIME DESTINATION ${GR_RUNTIME_DIR} COMPONENT "audio_runtime" # .dll file
+)
+
+install(FILES ${gr_audio_confs} DESTINATION ${GR_PKG_CONF_DIR} COMPONENT "audio_runtime")
diff --git a/gr-audio/lib/alsa/audio_alsa_sink.h b/gr-audio/lib/alsa/audio_alsa_sink.h
index 23e406d6b..b33b84644 100644
--- a/gr-audio/lib/alsa/audio_alsa_sink.h
+++ b/gr-audio/lib/alsa/audio_alsa_sink.h
@@ -34,6 +34,7 @@
/*!
* \brief audio sink using ALSA
+ * \ingroup audio_blk
*
* The sink has N input streams of floats, where N depends
* on the hardware characteristics of the selected device.
diff --git a/gr-audio/lib/alsa/audio_alsa_source.h b/gr-audio/lib/alsa/audio_alsa_source.h
index e38af3872..142ae711a 100644
--- a/gr-audio/lib/alsa/audio_alsa_source.h
+++ b/gr-audio/lib/alsa/audio_alsa_source.h
@@ -37,6 +37,7 @@ typedef boost::shared_ptr<audio_alsa_source> audio_alsa_source_sptr;
/*!
* \brief audio source using ALSA
+ * \ingroup audio_blk
*
* The source has between 1 and N input streams of floats, where N is
* depends on the hardware characteristics of the selected device.
diff --git a/gr-audio/lib/jack/audio_jack_sink.h b/gr-audio/lib/jack/audio_jack_sink.h
index a11863ee0..5500b3641 100644
--- a/gr-audio/lib/jack/audio_jack_sink.h
+++ b/gr-audio/lib/jack/audio_jack_sink.h
@@ -32,6 +32,7 @@ int jack_sink_process (jack_nframes_t nframes, void *arg);
/*!
* \brief audio sink using JACK
+ * \ingroup audio_blk
*
* The sink has one input stream of floats.
*
diff --git a/gr-audio/lib/jack/audio_jack_source.h b/gr-audio/lib/jack/audio_jack_source.h
index 858f34528..a155bf95b 100644
--- a/gr-audio/lib/jack/audio_jack_source.h
+++ b/gr-audio/lib/jack/audio_jack_source.h
@@ -32,6 +32,7 @@ int jack_source_process (jack_nframes_t nframes, void *arg);
/*!
* \brief audio source using JACK
+ * \ingroup audio_blk
*
* The source has one input stream of floats.
*
diff --git a/gr-audio/lib/oss/audio_oss_sink.h b/gr-audio/lib/oss/audio_oss_sink.h
index 0d7280c2f..47b1407d3 100644
--- a/gr-audio/lib/oss/audio_oss_sink.h
+++ b/gr-audio/lib/oss/audio_oss_sink.h
@@ -28,6 +28,7 @@
/*!
* \brief audio sink using OSS
+ * \ingroup audio_blk
*
* input signature is one or two streams of floats.
* Input samples must be in the range [-1,1].
diff --git a/gr-audio/lib/oss/audio_oss_source.h b/gr-audio/lib/oss/audio_oss_source.h
index b20ef5c05..df9f68e42 100644
--- a/gr-audio/lib/oss/audio_oss_source.h
+++ b/gr-audio/lib/oss/audio_oss_source.h
@@ -28,6 +28,7 @@
/*!
* \brief audio source using OSS
+ * \ingroup audio_blk
*
* Output signature is one or two streams of floats.
* Output samples will be in the range [-1,1].
diff --git a/gr-audio/lib/osx/audio_osx_sink.h b/gr-audio/lib/osx/audio_osx_sink.h
index 13bd95d53..e7598097d 100644
--- a/gr-audio/lib/osx/audio_osx_sink.h
+++ b/gr-audio/lib/osx/audio_osx_sink.h
@@ -31,6 +31,7 @@
/*!
* \brief audio sink using OSX
+ * \ingroup audio_blk
*
* input signature is one or two streams of floats.
* Input samples must be in the range [-1,1].
diff --git a/gr-audio/lib/osx/audio_osx_source.h b/gr-audio/lib/osx/audio_osx_source.h
index a373ea94f..435172a2c 100644
--- a/gr-audio/lib/osx/audio_osx_source.h
+++ b/gr-audio/lib/osx/audio_osx_source.h
@@ -31,6 +31,7 @@
/*!
* \brief audio source using OSX
+ * \ingroup audio_blk
*
* Input signature is one or two streams of floats.
* Samples must be in the range [-1,1].
diff --git a/gr-audio/lib/portaudio/audio_portaudio_sink.h b/gr-audio/lib/portaudio/audio_portaudio_sink.h
index 6426a32ac..04a881f7e 100644
--- a/gr-audio/lib/portaudio/audio_portaudio_sink.h
+++ b/gr-audio/lib/portaudio/audio_portaudio_sink.h
@@ -34,7 +34,8 @@ PaStreamCallback portaudio_sink_callback;
/*!
- * \ Audio sink using PORTAUDIO
+ * \brief Audio sink using PORTAUDIO
+ * \ingroup audio_blk
*
* Input samples must be in the range [-1,1].
*/
diff --git a/gr-audio/lib/portaudio/audio_portaudio_source.h b/gr-audio/lib/portaudio/audio_portaudio_source.h
index 245b3410b..b555bc759 100644
--- a/gr-audio/lib/portaudio/audio_portaudio_source.h
+++ b/gr-audio/lib/portaudio/audio_portaudio_source.h
@@ -33,7 +33,8 @@ PaStreamCallback portaudio_source_callback;
/*!
- * \ Audio source using PORTAUDIO
+ * \brief Audio source using PORTAUDIO
+ * \ingroup audio_blk
*
* Input samples must be in the range [-1,1].
*/
diff --git a/gr-audio/lib/windows/audio_windows_sink.h b/gr-audio/lib/windows/audio_windows_sink.h
index 6819bd448..d4ca259b3 100644
--- a/gr-audio/lib/windows/audio_windows_sink.h
+++ b/gr-audio/lib/windows/audio_windows_sink.h
@@ -34,6 +34,7 @@
/*!
* \brief audio sink using winmm mmsystem (win32 only)
+ * \ingroup audio_blk
*
* input signature is one or two streams of floats.
* Input samples must be in the range [-1,1].
diff --git a/gr-audio/lib/windows/audio_windows_source.h b/gr-audio/lib/windows/audio_windows_source.h
index 36311968d..9cb789576 100644
--- a/gr-audio/lib/windows/audio_windows_source.h
+++ b/gr-audio/lib/windows/audio_windows_source.h
@@ -28,6 +28,7 @@
/*!
* \brief audio source using winmm mmsystem (win32 only)
+ * \ingroup audio_blk
*
* Output signature is one or two streams of floats.
* Output samples will be in the range [-1,1].
diff --git a/gr-audio/swig/CMakeLists.txt b/gr-audio/swig/CMakeLists.txt
new file mode 100644
index 000000000..3e7b7f861
--- /dev/null
+++ b/gr-audio/swig/CMakeLists.txt
@@ -0,0 +1,51 @@
+# 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.
+
+########################################################################
+# Setup swig generation
+########################################################################
+include(GrPython)
+include(GrSwig)
+
+set(GR_SWIG_INCLUDE_DIRS
+ ${GR_AUDIO_INCLUDE_DIRS}
+ ${GNURADIO_CORE_SWIG_INCLUDE_DIRS}
+)
+
+set(GR_SWIG_LIBRARIES gnuradio-audio)
+
+GR_SWIG_MAKE(audio_swig audio_swig.i)
+
+GR_SWIG_INSTALL(
+ TARGETS audio_swig
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/audio
+ COMPONENT "audio_python"
+)
+
+install(
+ FILES audio_swig.i
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
+ COMPONENT "audio_swig"
+)
+
+GR_PYTHON_INSTALL(
+ FILES __init__.py
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/audio
+ COMPONENT "audio_python"
+)
diff --git a/gr-audio/swig/Makefile.swig.gen b/gr-audio/swig/Makefile.swig.gen
index 7cdf04665..14322c0e5 100644
--- a/gr-audio/swig/Makefile.swig.gen
+++ b/gr-audio/swig/Makefile.swig.gen
@@ -1,6 +1,6 @@
# -*- Makefile -*-
#
-# Copyright 2011 Free Software Foundation, Inc.
+# Copyright 2009 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -105,7 +105,7 @@ _audio_swig_la_CXXFLAGS = \
$(audio_swig_la_swig_cxxflags)
python/audio_swig.cc: audio_swig.py
-audio_swig.py: audio_swig.i
+audio_swig.py: audio_swig.i
# Include the python dependencies for this file
-include python/audio_swig.d