From 77da72f511647d458b62ffefaa94662b78d7f7d3 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 9 Mar 2011 00:52:55 -0800 Subject: audio: added audio factory registry and top level includes --- gr-audio/include/gr_audio_sink.h | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 gr-audio/include/gr_audio_sink.h (limited to 'gr-audio/include/gr_audio_sink.h') diff --git a/gr-audio/include/gr_audio_sink.h b/gr-audio/include/gr_audio_sink.h new file mode 100644 index 000000000..37ea6e7ba --- /dev/null +++ b/gr-audio/include/gr_audio_sink.h @@ -0,0 +1,41 @@ +/* + * 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. + */ + +#ifndef INCLUDED_GR_AUDIO_SINK_H +#define INCLUDED_GR_AUDIO_SINK_H + +#include +#include + +class GR_AUDIO_API gr_audio_sink : public gr_sync_block{ +public: + typedef boost::shared_ptr sptr; + + +}; + +GR_AUDIO_API gr_audio_sink::sptr gr_make_audio_sink( + int sampling_rate, + const std::string device_name = "", + bool ok_to_block = true +); + +#endif /* INCLUDED_GR_AUDIO_SINK_H */ -- cgit From 24d30ff306a906b21ad724c07a95caed24659887 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 9 Mar 2011 10:29:53 -0800 Subject: audio: work to get alsa support in, lets see if this works before adding more --- gr-audio/include/gr_audio_sink.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gr-audio/include/gr_audio_sink.h') diff --git a/gr-audio/include/gr_audio_sink.h b/gr-audio/include/gr_audio_sink.h index 37ea6e7ba..1a8585b82 100644 --- a/gr-audio/include/gr_audio_sink.h +++ b/gr-audio/include/gr_audio_sink.h @@ -29,6 +29,11 @@ class GR_AUDIO_API gr_audio_sink : public gr_sync_block{ public: typedef boost::shared_ptr sptr; + gr_audio_sink( + const std::string &name, + gr_io_signature_sptr insig, + gr_io_signature_sptr outsig + ); }; -- cgit From 4cba8db90fe1412232a4c1a20d834f6ce606baf0 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 9 Mar 2011 11:17:04 -0800 Subject: audio: work on swig support, it imports --- gr-audio/include/gr_audio_sink.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gr-audio/include/gr_audio_sink.h') diff --git a/gr-audio/include/gr_audio_sink.h b/gr-audio/include/gr_audio_sink.h index 1a8585b82..c76ec6550 100644 --- a/gr-audio/include/gr_audio_sink.h +++ b/gr-audio/include/gr_audio_sink.h @@ -25,11 +25,11 @@ #include #include -class GR_AUDIO_API gr_audio_sink : public gr_sync_block{ +class GR_AUDIO_API audio_sink : public gr_sync_block{ public: - typedef boost::shared_ptr sptr; + typedef boost::shared_ptr sptr; - gr_audio_sink( + audio_sink( const std::string &name, gr_io_signature_sptr insig, gr_io_signature_sptr outsig @@ -37,7 +37,7 @@ public: }; -GR_AUDIO_API gr_audio_sink::sptr gr_make_audio_sink( +GR_AUDIO_API audio_sink::sptr audio_make_sink( int sampling_rate, const std::string device_name = "", bool ok_to_block = true -- cgit From f8ce10742ab6b9ac170432ae78d2ee2d6c538d72 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 16 Mar 2011 15:07:37 -0700 Subject: audio: cleanup audio source/sink with virtual inheritance The audio implementations now inherit from sync block (as they used to). And the redundant constructor in audio source/sink has been removed. --- gr-audio/include/gr_audio_sink.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'gr-audio/include/gr_audio_sink.h') diff --git a/gr-audio/include/gr_audio_sink.h b/gr-audio/include/gr_audio_sink.h index c76ec6550..ca3b15a37 100644 --- a/gr-audio/include/gr_audio_sink.h +++ b/gr-audio/include/gr_audio_sink.h @@ -25,16 +25,9 @@ #include #include -class GR_AUDIO_API audio_sink : public gr_sync_block{ +class GR_AUDIO_API audio_sink : virtual public gr_sync_block{ public: typedef boost::shared_ptr sptr; - - audio_sink( - const std::string &name, - gr_io_signature_sptr insig, - gr_io_signature_sptr outsig - ); - }; GR_AUDIO_API audio_sink::sptr audio_make_sink( -- cgit