summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rondeau2011-11-27 15:50:13 -0500
committerTom Rondeau2011-11-27 15:50:13 -0500
commit633fd3b6cfc6c735a5adf2e91328fed4c67d7f51 (patch)
treedccc236f81a7d5559839543414cf60e704c8d7fb
parent0a21e2584c226496af2aa3b361bed3d6bd91ba41 (diff)
downloadgnuradio-633fd3b6cfc6c735a5adf2e91328fed4c67d7f51.tar.gz
gnuradio-633fd3b6cfc6c735a5adf2e91328fed4c67d7f51.tar.bz2
gnuradio-633fd3b6cfc6c735a5adf2e91328fed4c67d7f51.zip
docs: added python doxygen docs to gr-audio.
-rw-r--r--gr-audio/include/gr_audio_sink.h17
-rw-r--r--gr-audio/include/gr_audio_source.h17
-rw-r--r--gr-audio/swig/CMakeLists.txt3
-rw-r--r--gr-audio/swig/__init__.py7
-rw-r--r--gr-audio/swig/audio_swig.i3
5 files changed, 35 insertions, 12 deletions
diff --git a/gr-audio/include/gr_audio_sink.h b/gr-audio/include/gr_audio_sink.h
index ec064b64b..7a1caaf80 100644
--- a/gr-audio/include/gr_audio_sink.h
+++ b/gr-audio/include/gr_audio_sink.h
@@ -28,7 +28,13 @@
/*!
* \brief Creates a sink from an audio device.
* \ingroup audio_blk
- *
+ */
+class GR_AUDIO_API audio_sink : virtual public gr_sync_block{
+public:
+ typedef boost::shared_ptr<audio_sink> sptr;
+};
+
+/*!
* 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:
@@ -37,12 +43,11 @@
* \li plughw:0,0
* \li surround51
* \li /dev/dsp
+ *
+ * \xmlonly
+ * - pulse, hw:0,0, plughw:0,0, surround51, /dev/dsp
+ * \endxmlonly
*/
-class GR_AUDIO_API audio_sink : virtual public gr_sync_block{
-public:
- typedef boost::shared_ptr<audio_sink> sptr;
-};
-
GR_AUDIO_API audio_sink::sptr audio_make_sink(
int sampling_rate,
const std::string device_name = "",
diff --git a/gr-audio/include/gr_audio_source.h b/gr-audio/include/gr_audio_source.h
index eca22e3eb..8fe2b9b47 100644
--- a/gr-audio/include/gr_audio_source.h
+++ b/gr-audio/include/gr_audio_source.h
@@ -28,7 +28,13 @@
/*!
* \brief Creates a source from an audio device.
* \ingroup audio_blk
- *
+ */
+class GR_AUDIO_API audio_source : virtual public gr_sync_block{
+public:
+ typedef boost::shared_ptr<audio_source> sptr;
+};
+
+/*!
* 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:
@@ -37,12 +43,11 @@
* \li plughw:0,0
* \li surround51
* \li /dev/dsp
+ *
+ * \xmlonly
+ * - pulse, hw:0,0, plughw:0,0, surround51, /dev/dsp
+ * \endxmlonly
*/
-class GR_AUDIO_API audio_source : virtual public gr_sync_block{
-public:
- typedef boost::shared_ptr<audio_source> sptr;
-};
-
GR_AUDIO_API audio_source::sptr audio_make_source(
int sampling_rate,
const std::string device_name = "",
diff --git a/gr-audio/swig/CMakeLists.txt b/gr-audio/swig/CMakeLists.txt
index 3e7b7f861..bcc02cdb0 100644
--- a/gr-audio/swig/CMakeLists.txt
+++ b/gr-audio/swig/CMakeLists.txt
@@ -28,6 +28,9 @@ set(GR_SWIG_INCLUDE_DIRS
${GNURADIO_CORE_SWIG_INCLUDE_DIRS}
)
+set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/audio_swig_doc.i)
+set(GR_SWIG_DOC_DIRS ${GR_AUDIO_INCLUDE_DIRS})
+
set(GR_SWIG_LIBRARIES gnuradio-audio)
GR_SWIG_MAKE(audio_swig audio_swig.i)
diff --git a/gr-audio/swig/__init__.py b/gr-audio/swig/__init__.py
index 23efda07e..c1b9a0493 100644
--- a/gr-audio/swig/__init__.py
+++ b/gr-audio/swig/__init__.py
@@ -19,4 +19,11 @@
# Boston, MA 02110-1301, USA.
#
+'''
+This is the gr-audio package. This package is used to connect to audio
+sources (mic-in) and sinks (speaker-out) ports on a computer. The
+underlying hardware driver is system and OS dependent and this module
+should automatically discover the correct one to use.
+'''
+
from audio_swig import *
diff --git a/gr-audio/swig/audio_swig.i b/gr-audio/swig/audio_swig.i
index 1e3cca299..71db0ae09 100644
--- a/gr-audio/swig/audio_swig.i
+++ b/gr-audio/swig/audio_swig.i
@@ -27,6 +27,9 @@
////////////////////////////////////////////////////////////////////////
%include "gnuradio.i"
+//load generated python docstrings
+%include "audio_swig_doc.i"
+
////////////////////////////////////////////////////////////////////////
// block headers
////////////////////////////////////////////////////////////////////////