diff options
-rw-r--r-- | gr-audio/include/gr_audio_sink.h | 9 | ||||
-rw-r--r-- | gr-audio/include/gr_audio_source.h | 9 | ||||
-rw-r--r-- | gr-audio/lib/alsa/audio_alsa_sink.cc | 2 | ||||
-rw-r--r-- | gr-audio/lib/alsa/audio_alsa_source.cc | 2 | ||||
-rw-r--r-- | gr-audio/lib/gr_audio_registry.cc | 21 | ||||
-rw-r--r-- | gr-audio/lib/jack/audio_jack_sink.cc | 2 | ||||
-rw-r--r-- | gr-audio/lib/jack/audio_jack_source.cc | 2 | ||||
-rw-r--r-- | gr-audio/lib/oss/audio_oss_sink.cc | 2 | ||||
-rw-r--r-- | gr-audio/lib/oss/audio_oss_source.cc | 2 | ||||
-rw-r--r-- | gr-audio/lib/osx/audio_osx_sink.cc | 2 | ||||
-rw-r--r-- | gr-audio/lib/osx/audio_osx_source.cc | 2 | ||||
-rw-r--r-- | gr-audio/lib/portaudio/audio_portaudio_sink.cc | 2 | ||||
-rw-r--r-- | gr-audio/lib/portaudio/audio_portaudio_source.cc | 2 | ||||
-rw-r--r-- | gr-audio/lib/windows/audio_windows_sink.cc | 2 | ||||
-rw-r--r-- | gr-audio/lib/windows/audio_windows_source.cc | 2 | ||||
-rw-r--r-- | gr-uhd/include/gr_uhd_usrp_sink.h | 8 | ||||
-rw-r--r-- | gr-uhd/include/gr_uhd_usrp_source.h | 8 | ||||
-rw-r--r-- | gr-uhd/lib/gr_uhd_usrp_sink.cc | 16 | ||||
-rw-r--r-- | gr-uhd/lib/gr_uhd_usrp_source.cc | 16 |
19 files changed, 26 insertions, 85 deletions
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 <gr_audio_api.h> #include <gr_sync_block.h> -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<audio_sink> 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( diff --git a/gr-audio/include/gr_audio_source.h b/gr-audio/include/gr_audio_source.h index ed3c31c10..b8ae2ca5f 100644 --- a/gr-audio/include/gr_audio_source.h +++ b/gr-audio/include/gr_audio_source.h @@ -25,16 +25,9 @@ #include <gr_audio_api.h> #include <gr_sync_block.h> -class GR_AUDIO_API audio_source : public gr_sync_block{ +class GR_AUDIO_API audio_source : virtual public gr_sync_block{ public: typedef boost::shared_ptr<audio_source> sptr; - - audio_source( - const std::string &name, - gr_io_signature_sptr insig, - gr_io_signature_sptr outsig - ); - }; GR_AUDIO_API audio_source::sptr audio_make_source( diff --git a/gr-audio/lib/alsa/audio_alsa_sink.cc b/gr-audio/lib/alsa/audio_alsa_sink.cc index 0728f421c..5fd197ec7 100644 --- a/gr-audio/lib/alsa/audio_alsa_sink.cc +++ b/gr-audio/lib/alsa/audio_alsa_sink.cc @@ -74,7 +74,7 @@ default_nperiods () audio_alsa_sink::audio_alsa_sink (int sampling_rate, const std::string device_name, bool ok_to_block) - : audio_sink ("audio_alsa_sink", + : gr_sync_block ("audio_alsa_sink", gr_make_io_signature (0, 0, 0), gr_make_io_signature (0, 0, 0)), d_sampling_rate (sampling_rate), diff --git a/gr-audio/lib/alsa/audio_alsa_source.cc b/gr-audio/lib/alsa/audio_alsa_source.cc index e46a7fdd4..4f0042b22 100644 --- a/gr-audio/lib/alsa/audio_alsa_source.cc +++ b/gr-audio/lib/alsa/audio_alsa_source.cc @@ -73,7 +73,7 @@ default_nperiods () audio_alsa_source::audio_alsa_source (int sampling_rate, const std::string device_name, bool ok_to_block) - : audio_source ("audio_alsa_source", + : gr_sync_block ("audio_alsa_source", gr_make_io_signature (0, 0, 0), gr_make_io_signature (0, 0, 0)), d_sampling_rate (sampling_rate), diff --git a/gr-audio/lib/gr_audio_registry.cc b/gr-audio/lib/gr_audio_registry.cc index c47db8289..da4b16b35 100644 --- a/gr-audio/lib/gr_audio_registry.cc +++ b/gr-audio/lib/gr_audio_registry.cc @@ -130,24 +130,3 @@ audio_sink::sptr audio_make_sink( //std::cout << "Audio sink arch: " << entry.name << std::endl; return entry.sink(sampling_rate, device_name, ok_to_block); } - -/*********************************************************************** - * Default constructors - **********************************************************************/ -#include <gr_io_signature.h> - -audio_sink::audio_sink( - const std::string &name, - gr_io_signature_sptr insig, - gr_io_signature_sptr outsig -): - gr_sync_block(name, insig, outsig) -{} - -audio_source::audio_source( - const std::string &name, - gr_io_signature_sptr insig, - gr_io_signature_sptr outsig -): - gr_sync_block(name, insig, outsig) -{} diff --git a/gr-audio/lib/jack/audio_jack_sink.cc b/gr-audio/lib/jack/audio_jack_sink.cc index db365a1f8..f06e77bd5 100644 --- a/gr-audio/lib/jack/audio_jack_sink.cc +++ b/gr-audio/lib/jack/audio_jack_sink.cc @@ -94,7 +94,7 @@ jack_sink_process (jack_nframes_t nframes, void *arg) audio_jack_sink::audio_jack_sink (int sampling_rate, const std::string device_name, bool ok_to_block) - : audio_sink ("audio_jack_sink", + : gr_sync_block ("audio_jack_sink", gr_make_io_signature (0, 0, 0), gr_make_io_signature (0, 0, 0)), d_sampling_rate (sampling_rate), diff --git a/gr-audio/lib/jack/audio_jack_source.cc b/gr-audio/lib/jack/audio_jack_source.cc index 415c7f22b..dcd41c3ac 100644 --- a/gr-audio/lib/jack/audio_jack_source.cc +++ b/gr-audio/lib/jack/audio_jack_source.cc @@ -95,7 +95,7 @@ jack_source_process (jack_nframes_t nframes, void *arg) audio_jack_source::audio_jack_source (int sampling_rate, const std::string device_name, bool ok_to_block) - : audio_source ("audio_jack_source", + : gr_sync_block ("audio_jack_source", gr_make_io_signature (0, 0, 0), gr_make_io_signature (0, 0, 0)), d_sampling_rate (sampling_rate), diff --git a/gr-audio/lib/oss/audio_oss_sink.cc b/gr-audio/lib/oss/audio_oss_sink.cc index 4e9e7cd79..34af16cce 100644 --- a/gr-audio/lib/oss/audio_oss_sink.cc +++ b/gr-audio/lib/oss/audio_oss_sink.cc @@ -53,7 +53,7 @@ default_device_name () audio_oss_sink::audio_oss_sink (int sampling_rate, const std::string device_name, bool ok_to_block) - : audio_sink ("audio_oss_sink", + : gr_sync_block ("audio_oss_sink", gr_make_io_signature (1, 2, sizeof (float)), gr_make_io_signature (0, 0, 0)), d_sampling_rate (sampling_rate), diff --git a/gr-audio/lib/oss/audio_oss_source.cc b/gr-audio/lib/oss/audio_oss_source.cc index b7d53931d..eefe4dd04 100644 --- a/gr-audio/lib/oss/audio_oss_source.cc +++ b/gr-audio/lib/oss/audio_oss_source.cc @@ -53,7 +53,7 @@ default_device_name () audio_oss_source::audio_oss_source (int sampling_rate, const std::string device_name, bool ok_to_block) - : audio_source ("audio_oss_source", + : gr_sync_block ("audio_oss_source", gr_make_io_signature (0, 0, 0), gr_make_io_signature (1, 2, sizeof (float))), d_sampling_rate (sampling_rate), diff --git a/gr-audio/lib/osx/audio_osx_sink.cc b/gr-audio/lib/osx/audio_osx_sink.cc index f7aeb54f8..901881da6 100644 --- a/gr-audio/lib/osx/audio_osx_sink.cc +++ b/gr-audio/lib/osx/audio_osx_sink.cc @@ -43,7 +43,7 @@ audio_osx_sink::audio_osx_sink (int sample_rate, bool do_block, int channel_config, int max_sample_count) - : audio_sink ("audio_osx_sink", + : gr_sync_block ("audio_osx_sink", gr_make_io_signature (0, 0, 0), gr_make_io_signature (0, 0, 0)), d_sample_rate (0.0), d_channel_config (0), d_n_channels (0), diff --git a/gr-audio/lib/osx/audio_osx_source.cc b/gr-audio/lib/osx/audio_osx_source.cc index e380156d6..61f8eb4a6 100644 --- a/gr-audio/lib/osx/audio_osx_source.cc +++ b/gr-audio/lib/osx/audio_osx_source.cc @@ -65,7 +65,7 @@ audio_osx_source::audio_osx_source (int sample_rate, bool do_block, int channel_config, int max_sample_count) - : audio_source ("audio_osx_source", + : gr_sync_block ("audio_osx_source", gr_make_io_signature (0, 0, 0), gr_make_io_signature (0, 0, 0)), d_deviceSampleRate (0.0), d_outputSampleRate (0.0), diff --git a/gr-audio/lib/portaudio/audio_portaudio_sink.cc b/gr-audio/lib/portaudio/audio_portaudio_sink.cc index 515cd04d9..7fdb99577 100644 --- a/gr-audio/lib/portaudio/audio_portaudio_sink.cc +++ b/gr-audio/lib/portaudio/audio_portaudio_sink.cc @@ -130,7 +130,7 @@ portaudio_sink_callback (const void *inputBuffer, audio_portaudio_sink::audio_portaudio_sink(int sampling_rate, const std::string device_name, bool ok_to_block) - : audio_sink ("audio_portaudio_sink", + : gr_sync_block ("audio_portaudio_sink", gr_make_io_signature(0, 0, 0), gr_make_io_signature(0, 0, 0)), d_sampling_rate(sampling_rate), diff --git a/gr-audio/lib/portaudio/audio_portaudio_source.cc b/gr-audio/lib/portaudio/audio_portaudio_source.cc index bdb8b3b3d..55828ad21 100644 --- a/gr-audio/lib/portaudio/audio_portaudio_source.cc +++ b/gr-audio/lib/portaudio/audio_portaudio_source.cc @@ -129,7 +129,7 @@ portaudio_source_callback (const void *inputBuffer, audio_portaudio_source::audio_portaudio_source(int sampling_rate, const std::string device_name, bool ok_to_block) - : audio_source ("audio_portaudio_source", + : gr_sync_block ("audio_portaudio_source", gr_make_io_signature(0, 0, 0), gr_make_io_signature(0, 0, 0)), d_sampling_rate(sampling_rate), diff --git a/gr-audio/lib/windows/audio_windows_sink.cc b/gr-audio/lib/windows/audio_windows_sink.cc index e3f67a8f4..5284ce173 100644 --- a/gr-audio/lib/windows/audio_windows_sink.cc +++ b/gr-audio/lib/windows/audio_windows_sink.cc @@ -54,7 +54,7 @@ default_device_name () } audio_windows_sink::audio_windows_sink (int sampling_freq, const std::string device_name) - : audio_sink ("audio_windows_sink", + : gr_sync_block ("audio_windows_sink", gr_make_io_signature (1, 2, sizeof (float)), gr_make_io_signature (0, 0, 0)), d_sampling_freq (sampling_freq), diff --git a/gr-audio/lib/windows/audio_windows_source.cc b/gr-audio/lib/windows/audio_windows_source.cc index 4b657a0e3..75b0a33bb 100644 --- a/gr-audio/lib/windows/audio_windows_source.cc +++ b/gr-audio/lib/windows/audio_windows_source.cc @@ -54,7 +54,7 @@ default_device_name () } audio_windows_source::audio_windows_source (int sampling_freq, const std::string device_name) - : audio_source ("audio_windows_source", + : gr_sync_block ("audio_windows_source", gr_make_io_signature (0, 0, 0), gr_make_io_signature (1, 2, sizeof (float))), d_sampling_freq (sampling_freq), diff --git a/gr-uhd/include/gr_uhd_usrp_sink.h b/gr-uhd/include/gr_uhd_usrp_sink.h index 557cb2cdb..0475957de 100644 --- a/gr-uhd/include/gr_uhd_usrp_sink.h +++ b/gr-uhd/include/gr_uhd_usrp_sink.h @@ -34,16 +34,10 @@ GR_UHD_API boost::shared_ptr<uhd_usrp_sink> uhd_make_usrp_sink( size_t num_channels ); -class GR_UHD_API uhd_usrp_sink : public gr_sync_block{ +class GR_UHD_API uhd_usrp_sink : virtual public gr_sync_block{ public: /*! - * Set the IO signature for this block. - * \param sig the input signature - */ - uhd_usrp_sink(gr_io_signature_sptr sig); - - /*! * Set the subdevice specification. * \param spec the subdev spec markup string * \param mboard the motherboard index 0 to M-1 diff --git a/gr-uhd/include/gr_uhd_usrp_source.h b/gr-uhd/include/gr_uhd_usrp_source.h index 3b36bf45d..038f9a91e 100644 --- a/gr-uhd/include/gr_uhd_usrp_source.h +++ b/gr-uhd/include/gr_uhd_usrp_source.h @@ -34,16 +34,10 @@ GR_UHD_API boost::shared_ptr<uhd_usrp_source> uhd_make_usrp_source( size_t num_channels ); -class GR_UHD_API uhd_usrp_source : public gr_sync_block{ +class GR_UHD_API uhd_usrp_source : virtual public gr_sync_block{ public: /*! - * Set the IO signature for this block. - * \param sig the output signature - */ - uhd_usrp_source(gr_io_signature_sptr sig); - - /*! * Set the subdevice specification. * \param spec the subdev spec markup string * \param mboard the motherboard index 0 to M-1 diff --git a/gr-uhd/lib/gr_uhd_usrp_sink.cc b/gr-uhd/lib/gr_uhd_usrp_sink.cc index b8b99a41a..d44af25ab 100644 --- a/gr-uhd/lib/gr_uhd_usrp_sink.cc +++ b/gr-uhd/lib/gr_uhd_usrp_sink.cc @@ -24,14 +24,6 @@ #include <stdexcept> /*********************************************************************** - * UHD Multi USRP Sink - **********************************************************************/ -uhd_usrp_sink::uhd_usrp_sink(gr_io_signature_sptr sig) -:gr_sync_block("gr uhd usrp sink", sig, gr_make_io_signature(0, 0, 0)){ - /* NOP */ -} - -/*********************************************************************** * UHD Multi USRP Sink Impl **********************************************************************/ class uhd_usrp_sink_impl : public uhd_usrp_sink{ @@ -41,9 +33,11 @@ public: const uhd::io_type_t &io_type, size_t num_channels ): - uhd_usrp_sink(gr_make_io_signature( - num_channels, num_channels, io_type.size - )), + gr_sync_block( + "gr uhd usrp sink", + gr_make_io_signature(num_channels, num_channels, io_type.size), + gr_make_io_signature(0, 0, 0) + ), _type(io_type), _nchan(num_channels), _has_time_spec(_nchan > 1) diff --git a/gr-uhd/lib/gr_uhd_usrp_source.cc b/gr-uhd/lib/gr_uhd_usrp_source.cc index 1234ed7fe..fed8e6624 100644 --- a/gr-uhd/lib/gr_uhd_usrp_source.cc +++ b/gr-uhd/lib/gr_uhd_usrp_source.cc @@ -26,14 +26,6 @@ #include <boost/format.hpp> /*********************************************************************** - * UHD Multi USRP Source - **********************************************************************/ -uhd_usrp_source::uhd_usrp_source(gr_io_signature_sptr sig) -:gr_sync_block("gr uhd usrp source", gr_make_io_signature(0, 0, 0), sig){ - /* NOP */ -} - -/*********************************************************************** * UHD Multi USRP Source Impl **********************************************************************/ class uhd_usrp_source_impl : public uhd_usrp_source{ @@ -43,9 +35,11 @@ public: const uhd::io_type_t &io_type, size_t num_channels ): - uhd_usrp_source(gr_make_io_signature( - num_channels, num_channels, io_type.size - )), + gr_sync_block( + "gr uhd usrp source", + gr_make_io_signature(0, 0, 0), + gr_make_io_signature(num_channels, num_channels, io_type.size) + ), _type(io_type), _nchan(num_channels), _stream_now(_nchan == 1), |