diff options
Diffstat (limited to 'gr-audio')
-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/Makefile.am | 5 | ||||
-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/osx/audio_osx_source.h | 2 | ||||
-rw-r--r-- | gr-audio/lib/osx/circular_buffer.h | 315 | ||||
-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 |
18 files changed, 333 insertions, 52 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/Makefile.am b/gr-audio/lib/Makefile.am index 42a2b867b..2bec73ff0 100644 --- a/gr-audio/lib/Makefile.am +++ b/gr-audio/lib/Makefile.am @@ -35,7 +35,7 @@ libgnuradio_audio_la_SOURCES = \ libgnuradio_audio_la_LIBADD = \ $(GNURADIO_CORE_LA) -libgnuradio_audio_la_LDFLAGS = $(LTVERSIONFLAGS) +libgnuradio_audio_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS) noinst_HEADERS = gr_audio_registry.h @@ -129,7 +129,8 @@ libgnuradio_audio_la_SOURCES += \ noinst_HEADERS += \ osx/audio_osx.h \ osx/audio_osx_source.h \ - osx/audio_osx_sink.h + osx/audio_osx_sink.h \ + osx/circular_buffer.h endif 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/osx/audio_osx_source.h b/gr-audio/lib/osx/audio_osx_source.h index 754f0d928..a373ea94f 100644 --- a/gr-audio/lib/osx/audio_osx_source.h +++ b/gr-audio/lib/osx/audio_osx_source.h @@ -36,7 +36,7 @@ * Samples must be in the range [-1,1]. */ -class audio_osx_source : public gr_sync_block { +class audio_osx_source : public audio_source { Float64 d_deviceSampleRate, d_outputSampleRate; int d_channel_config; diff --git a/gr-audio/lib/osx/circular_buffer.h b/gr-audio/lib/osx/circular_buffer.h new file mode 100644 index 000000000..48758bf87 --- /dev/null +++ b/gr-audio/lib/osx/circular_buffer.h @@ -0,0 +1,315 @@ +/* -*- c++ -*- */ +/* + * Copyright 2006,2009,2010 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 _CIRCULAR_BUFFER_H_ +#define _CIRCULAR_BUFFER_H_ + +#include <gruel/thread.h> +#include <iostream> +#include <stdexcept> + +#ifndef DO_DEBUG +#define DO_DEBUG 0 +#endif + +#if DO_DEBUG +#define DEBUG(X) do{X} while(0); +#else +#define DEBUG(X) do{} while(0); +#endif + +template <class T> +class circular_buffer +{ +private: +// the buffer to use + T* d_buffer; + +// the following are in Items (type T) + size_t d_bufLen_I, d_readNdx_I, d_writeNdx_I; + size_t d_n_avail_write_I, d_n_avail_read_I; + +// stuff to control access to class internals + gruel::mutex* d_internal; + gruel::condition_variable* d_readBlock; + gruel::condition_variable* d_writeBlock; + +// booleans to decide how to control reading, writing, and aborting + bool d_doWriteBlock, d_doFullRead, d_doAbort; + + void delete_mutex_cond () { + if (d_internal) { + delete d_internal; + d_internal = NULL; + } + if (d_readBlock) { + delete d_readBlock; + d_readBlock = NULL; + } + if (d_writeBlock) { + delete d_writeBlock; + d_writeBlock = NULL; + } + }; + +public: + circular_buffer (size_t bufLen_I, + bool doWriteBlock = true, bool doFullRead = false) { + if (bufLen_I == 0) + throw std::runtime_error ("circular_buffer(): " + "Number of items to buffer must be > 0.\n"); + d_bufLen_I = bufLen_I; + d_buffer = (T*) new T[d_bufLen_I]; + d_doWriteBlock = doWriteBlock; + d_doFullRead = doFullRead; + d_internal = NULL; + d_readBlock = d_writeBlock = NULL; + reset (); + DEBUG (std::cerr << "c_b(): buf len (items) = " << d_bufLen_ + << ", doWriteBlock = " << (d_doWriteBlock ? "true" : "false") + << ", doFullRead = " << (d_doFullRead ? "true" : "false") + << std::endl); + }; + + ~circular_buffer () { + delete_mutex_cond (); + delete [] d_buffer; + }; + + inline size_t n_avail_write_items () { + gruel::scoped_lock l (*d_internal); + size_t retVal = d_n_avail_write_I; + return (retVal); + }; + + inline size_t n_avail_read_items () { + gruel::scoped_lock l (*d_internal); + size_t retVal = d_n_avail_read_I; + return (retVal); + }; + + inline size_t buffer_length_items () {return (d_bufLen_I);}; + inline bool do_write_block () {return (d_doWriteBlock);}; + inline bool do_full_read () {return (d_doFullRead);}; + + void reset () { + d_doAbort = false; + bzero (d_buffer, d_bufLen_I * sizeof (T)); + d_readNdx_I = d_writeNdx_I = d_n_avail_read_I = 0; + d_n_avail_write_I = d_bufLen_I; + delete_mutex_cond (); + // create a mutex to handle contention of shared resources; + // any routine needed access to shared resources uses lock() + // before doing anything, then unlock() when finished. + d_internal = new gruel::mutex (); + // link the internal mutex to the read and write conditions; + // when wait() is called, the internal mutex will automatically + // be unlock()'ed. Upon return (from a notify_one() to the condition), + // the internal mutex will be lock()'ed. + d_readBlock = new gruel::condition_variable (); + d_writeBlock = new gruel::condition_variable (); + }; + +/* + * enqueue: add the given buffer of item-length to the queue, + * first-in-first-out (FIFO). + * + * inputs: + * buf: a pointer to the buffer holding the data + * + * bufLen_I: the buffer length in items (of the instantiated type) + * + * returns: + * -1: on overflow (write is not blocking, and data is being + * written faster than it is being read) + * 0: if nothing to do (0 length buffer) + * 1: if success + * 2: in the process of aborting, do doing nothing + * + * will throw runtime errors if inputs are improper: + * buffer pointer is NULL + * buffer length is larger than the instantiated buffer length + */ + + int enqueue (T* buf, size_t bufLen_I) { + DEBUG (std::cerr << "enqueue: buf = " << (void*) buf + << ", bufLen = " << bufLen_I + << ", #av_wr = " << d_n_avail_write_I + << ", #av_rd = " << d_n_avail_read_I << std::endl); + if (bufLen_I > d_bufLen_I) { + std::cerr << "ERROR: cannot add buffer longer (" + << bufLen_I << ") than instantiated length (" + << d_bufLen_I << ")." << std::endl; + throw std::runtime_error ("circular_buffer::enqueue()"); + } + + if (bufLen_I == 0) + return (0); + if (!buf) + throw std::runtime_error ("circular_buffer::enqueue(): " + "input buffer is NULL.\n"); + gruel::scoped_lock l (*d_internal); + if (d_doAbort) { + return (2); + } + // set the return value to 1: success; change if needed + int retval = 1; + if (bufLen_I > d_n_avail_write_I) { + if (d_doWriteBlock) { + while (bufLen_I > d_n_avail_write_I) { + DEBUG (std::cerr << "enqueue: #len > #a, waiting." << std::endl); + // wait; will automatically unlock() the internal mutex via + // the scoped lock + d_writeBlock->wait (l); + // and auto re-lock() it here. + if (d_doAbort) { + DEBUG (std::cerr << "enqueue: #len > #a, aborting." << std::endl); + return (2); + } + DEBUG (std::cerr << "enqueue: #len > #a, done waiting." << std::endl); + } + } else { + d_n_avail_read_I = d_bufLen_I - bufLen_I; + d_n_avail_write_I = bufLen_I; + DEBUG (std::cerr << "circular_buffer::enqueue: overflow" << std::endl); + retval = -1; + } + } + size_t n_now_I = d_bufLen_I - d_writeNdx_I, n_start_I = 0; + if (n_now_I > bufLen_I) + n_now_I = bufLen_I; + else if (n_now_I < bufLen_I) + n_start_I = bufLen_I - n_now_I; + bcopy (buf, &(d_buffer[d_writeNdx_I]), n_now_I * sizeof (T)); + if (n_start_I) { + bcopy (&(buf[n_now_I]), d_buffer, n_start_I * sizeof (T)); + d_writeNdx_I = n_start_I; + } else + d_writeNdx_I += n_now_I; + d_n_avail_read_I += bufLen_I; + d_n_avail_write_I -= bufLen_I; + d_readBlock->notify_one (); + return (retval); + }; + +/* + * dequeue: removes from the queue the number of items requested, or + * available, into the given buffer on a FIFO basis. + * + * inputs: + * buf: a pointer to the buffer into which to copy the data + * + * bufLen_I: pointer to the number of items to remove in items + * (of the instantiated type) + * + * returns: + * 0: if nothing to do (0 length buffer) + * 1: if success + * 2: in the process of aborting, do doing nothing + * + * will throw runtime errors if inputs are improper: + * buffer pointer is NULL + * buffer length pointer is NULL + * buffer length is larger than the instantiated buffer length + */ + + int dequeue (T* buf, size_t* bufLen_I) { + DEBUG (std::cerr << "dequeue: buf = " << ((void*) buf) + << ", *bufLen = " << (*bufLen_I) + << ", #av_wr = " << d_n_avail_write_I + << ", #av_rd = " << d_n_avail_read_I << std::endl); + if (!bufLen_I) + throw std::runtime_error ("circular_buffer::dequeue(): " + "input bufLen pointer is NULL.\n"); + if (!buf) + throw std::runtime_error ("circular_buffer::dequeue(): " + "input buffer pointer is NULL.\n"); + size_t l_bufLen_I = *bufLen_I; + if (l_bufLen_I == 0) + return (0); + if (l_bufLen_I > d_bufLen_I) { + std::cerr << "ERROR: cannot remove buffer longer (" + << l_bufLen_I << ") than instantiated length (" + << d_bufLen_I << ")." << std::endl; + throw std::runtime_error ("circular_buffer::dequeue()"); + } + + gruel::scoped_lock l (*d_internal); + if (d_doAbort) { + return (2); + } + if (d_doFullRead) { + while (d_n_avail_read_I < l_bufLen_I) { + DEBUG (std::cerr << "dequeue: #a < #len, waiting." << std::endl); + // wait; will automatically unlock() the internal mutex via + // the scoped lock + d_readBlock->wait (l); + // and re-lock() it here. + if (d_doAbort) { + DEBUG (std::cerr << "dequeue: #a < #len, aborting." << std::endl); + return (2); + } + DEBUG (std::cerr << "dequeue: #a < #len, done waiting." << std::endl); + } + } else { + while (d_n_avail_read_I == 0) { + DEBUG (std::cerr << "dequeue: #a == 0, waiting." << std::endl); + // wait; will automatically unlock() the internal mutex via + // the scoped lock + d_readBlock->wait (l); + // and re-lock() it here. + if (d_doAbort) { + DEBUG (std::cerr << "dequeue: #a == 0, aborting." << std::endl); + return (2); + } + DEBUG (std::cerr << "dequeue: #a == 0, done waiting." << std::endl); + } + } + if (l_bufLen_I > d_n_avail_read_I) + l_bufLen_I = d_n_avail_read_I; + size_t n_now_I = d_bufLen_I - d_readNdx_I, n_start_I = 0; + if (n_now_I > l_bufLen_I) + n_now_I = l_bufLen_I; + else if (n_now_I < l_bufLen_I) + n_start_I = l_bufLen_I - n_now_I; + bcopy (&(d_buffer[d_readNdx_I]), buf, n_now_I * sizeof (T)); + if (n_start_I) { + bcopy (d_buffer, &(buf[n_now_I]), n_start_I * sizeof (T)); + d_readNdx_I = n_start_I; + } else + d_readNdx_I += n_now_I; + *bufLen_I = l_bufLen_I; + d_n_avail_read_I -= l_bufLen_I; + d_n_avail_write_I += l_bufLen_I; + d_writeBlock->notify_one (); + return (1); + }; + + void abort () { + gruel::scoped_lock l (*d_internal); + d_doAbort = true; + d_writeBlock->notify_one (); + d_readBlock->notify_one (); + }; +}; + +#endif /* _CIRCULAR_BUFFER_H_ */ 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), |