GNU Radio 3.5.1 C++ API
gr_audio_sink.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2011 Free Software Foundation, Inc.
00003  * 
00004  * This file is part of GNU Radio
00005  * 
00006  * GNU Radio is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 3, or (at your option)
00009  * any later version.
00010  * 
00011  * GNU Radio is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  * 
00016  * You should have received a copy of the GNU General Public License
00017  * along with GNU Radio; see the file COPYING.  If not, write to
00018  * the Free Software Foundation, Inc., 51 Franklin Street,
00019  * Boston, MA 02110-1301, USA.
00020  */
00021 
00022 #ifndef INCLUDED_GR_AUDIO_SINK_H
00023 #define INCLUDED_GR_AUDIO_SINK_H
00024 
00025 #include <gr_audio_api.h>
00026 #include <gr_sync_block.h>
00027 
00028 /*!
00029  * \brief Creates a sink from an audio device.
00030  * \ingroup audio_blk
00031  */
00032 class GR_AUDIO_API audio_sink : virtual public gr_sync_block{
00033 public:
00034     typedef boost::shared_ptr<audio_sink> sptr;
00035 };
00036 
00037 /*!
00038  * Creates a sink from an audio device at a specified
00039  * sample_rate. The specific audio device to use can be specified as
00040  * the device_name parameter. Typical choices are:
00041  * \li pulse
00042  * \li hw:0,0
00043  * \li plughw:0,0
00044  * \li surround51
00045  * \li /dev/dsp
00046  *
00047  * \xmlonly
00048  *    - pulse, hw:0,0, plughw:0,0, surround51, /dev/dsp
00049  * \endxmlonly
00050  */
00051 GR_AUDIO_API audio_sink::sptr audio_make_sink(
00052     int sampling_rate,
00053     const std::string device_name = "",
00054     bool ok_to_block = true
00055 );
00056 
00057 #endif /* INCLUDED_GR_AUDIO_SINK_H */