diff options
Diffstat (limited to 'gr-audio')
-rw-r--r-- | gr-audio/include/gr_audio_sink.h | 17 | ||||
-rw-r--r-- | gr-audio/include/gr_audio_source.h | 17 | ||||
-rw-r--r-- | gr-audio/swig/CMakeLists.txt | 3 | ||||
-rw-r--r-- | gr-audio/swig/__init__.py | 7 | ||||
-rw-r--r-- | gr-audio/swig/audio_swig.i | 3 |
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 //////////////////////////////////////////////////////////////////////// |