GNU Radio Manual and C++ API Reference 3.10.5.1
The Free & Open Software Radio Ecosystem
gr-audio/include/gnuradio/audio/sink.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2011,2013 Free Software Foundation, Inc.
4 *
5 * This file is part of GNU Radio
6 *
7 * SPDX-License-Identifier: GPL-3.0-or-later
8 *
9 */
10
11#ifndef INCLUDED_GR_AUDIO_SINK_H
12#define INCLUDED_GR_AUDIO_SINK_H
13
14#include <gnuradio/audio/api.h>
15#include <gnuradio/sync_block.h>
16
17namespace gr {
18namespace audio {
19
20/*!
21 * \brief Creates a sink from an audio device.
22 * \ingroup audio_blk
23 */
24class GR_AUDIO_API sink : virtual public sync_block
25{
26public:
27 typedef std::shared_ptr<sink> sptr;
28
29 /*!
30 * Creates a sink from an audio device at a specified
31 * sample_rate. The specific audio device to use can be
32 * specified as the device_name parameter. Typical choices are:
33 * \li pulse
34 * \li hw:0,0
35 * \li plughw:0,0
36 * \li surround51
37 * \li /dev/dsp
38 *
39 * \xmlonly
40 * - pulse, hw:0,0, plughw:0,0, surround51, /dev/dsp
41 * \endxmlonly
42 */
43 static sptr
44 make(int sampling_rate, const std::string device_name = "", bool ok_to_block = true);
45};
46
47} /* namespace audio */
48} /* namespace gr */
49
50#endif /* INCLUDED_GR_AUDIO_SINK_H */
Creates a sink from an audio device.
Definition: gr-audio/include/gnuradio/audio/sink.h:25
std::shared_ptr< sink > sptr
Definition: gr-audio/include/gnuradio/audio/sink.h:27
static sptr make(int sampling_rate, const std::string device_name="", bool ok_to_block=true)
synchronous 1:1 input to output with history
Definition: sync_block.h:26
#define GR_AUDIO_API
Definition: gr-audio/include/gnuradio/audio/api.h:18
GNU Radio logging wrapper.
Definition: basic_block.h:29