*
* 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 2, or (at your option)
+ * 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,
#include <gr_sync_block.h>
#include <gr_buffer.h>
-#include <omnithread.h>
+#include <gruel/thread.h>
#include <string>
#include <portaudio.h>
#include <stdexcept>
-#include <gri_logger.h>
+//#include <gri_logger.h>
class audio_portaudio_sink;
typedef boost::shared_ptr<audio_portaudio_sink> audio_portaudio_sink_sptr;
/*!
- * \PORTAUDIO audio sink.
+ * \brief PORTAUDIO audio sink.
+ *
* \param sampling_rate sampling rate in Hz
- * \param dev PORTAUDIO device name, e.g., "pa:"
+ * \param device_name PORTAUDIO device name, e.g., "pa:"
* \param ok_to_block true if it's ok for us to block
*/
audio_portaudio_sink_sptr
audio_portaudio_make_sink (int sampling_rate,
- const std::string dev = "",
+ const std::string device_name = "",
bool ok_to_block = true);
PaStreamCallback portaudio_sink_callback;
gr_buffer_sptr d_writer; // buffer used between work and callback
gr_buffer_reader_sptr d_reader;
- omni_semaphore d_ringbuffer_ready; // binary semaphore
+ gruel::mutex d_ringbuffer_mutex;
+ gruel::condition_variable d_ringbuffer_cond;
+ bool d_ringbuffer_ready;
// random stats
int d_nunderuns; // count of underruns
- gri_logger_sptr d_log; // handle to non-blocking logging instance
+ //gri_logger_sptr d_log; // handle to non-blocking logging instance
void output_error_msg (const char *msg, int err);
void bail (const char *msg, int err) throw (std::runtime_error);