*
* 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 he hope that it will be useful,
#include <unistd.h>
#include <stdexcept>
#include <gri_portaudio.h>
-#include <omnithread.h>
+#include <gnuradio/omnithread.h>
+#include <string.h>
-#define LOGGING 0 // define to 0 or 1
+//#define LOGGING 0 // define to 0 or 1
#define SAMPLE_FORMAT paFloat32
typedef float sample_t;
int navail_samples = self->d_reader->items_available();
if (nreqd_samples <= navail_samples){ // We've got enough data...
- if (LOGGING)
- self->d_log->printf("PAsink cb: f/b = %4ld\n", framesPerBuffer);
+ //if (LOGGING)
+ // self->d_log->printf("PAsink cb: f/b = %4ld\n", framesPerBuffer);
// copy from ringbuffer into output buffer
memcpy(outputBuffer,
self->d_reader->read_pointer(),
}
else { // underrun
- if (LOGGING)
- self->d_log->printf("PAsink cb: f/b = %4ld UNDERRUN\n", framesPerBuffer);
+ //if (LOGGING)
+ // self->d_log->printf("PAsink cb: f/b = %4ld UNDERRUN\n", framesPerBuffer);
self->d_nunderuns++;
::write(2, "aU", 2); // FIXME change to non-blocking call
d_nunderuns(0)
{
memset(&d_output_parameters, 0, sizeof(d_output_parameters));
- if (LOGGING)
- d_log = gri_logger::singleton();
+ //if (LOGGING)
+ // d_log = gri_logger::singleton();
PaError err;
int i, numDevices;