summaryrefslogtreecommitdiff
path: root/gr-audio-portaudio/src
diff options
context:
space:
mode:
Diffstat (limited to 'gr-audio-portaudio/src')
-rw-r--r--gr-audio-portaudio/src/audio_portaudio_sink.cc14
-rw-r--r--gr-audio-portaudio/src/audio_portaudio_sink.h4
-rw-r--r--gr-audio-portaudio/src/audio_portaudio_source.cc14
-rw-r--r--gr-audio-portaudio/src/audio_portaudio_source.h4
4 files changed, 18 insertions, 18 deletions
diff --git a/gr-audio-portaudio/src/audio_portaudio_sink.cc b/gr-audio-portaudio/src/audio_portaudio_sink.cc
index cfdc6302a..2e48feb4a 100644
--- a/gr-audio-portaudio/src/audio_portaudio_sink.cc
+++ b/gr-audio-portaudio/src/audio_portaudio_sink.cc
@@ -35,7 +35,7 @@
#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;
@@ -85,8 +85,8 @@ portaudio_sink_callback (const void *inputBuffer,
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(),
@@ -99,8 +99,8 @@ portaudio_sink_callback (const void *inputBuffer,
}
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
@@ -139,8 +139,8 @@ audio_portaudio_sink::audio_portaudio_sink(int sampling_rate,
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;
diff --git a/gr-audio-portaudio/src/audio_portaudio_sink.h b/gr-audio-portaudio/src/audio_portaudio_sink.h
index 0e082c5e2..1a0729799 100644
--- a/gr-audio-portaudio/src/audio_portaudio_sink.h
+++ b/gr-audio-portaudio/src/audio_portaudio_sink.h
@@ -28,7 +28,7 @@
#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;
@@ -79,7 +79,7 @@ class audio_portaudio_sink : public gr_sync_block {
// 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);
diff --git a/gr-audio-portaudio/src/audio_portaudio_source.cc b/gr-audio-portaudio/src/audio_portaudio_source.cc
index 29d63a8ed..9e883ad8a 100644
--- a/gr-audio-portaudio/src/audio_portaudio_source.cc
+++ b/gr-audio-portaudio/src/audio_portaudio_source.cc
@@ -35,7 +35,7 @@
#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;
@@ -84,8 +84,8 @@ portaudio_source_callback (const void *inputBuffer,
int nframes_room = self->d_writer->space_available() / nchan;
if (nframes_to_copy <= nframes_room){ // We've got room for the data ..
- if (LOGGING)
- self->d_log->printf("PAsrc cb: f/b = %4ld\n", framesPerBuffer);
+ //if (LOGGING)
+ // self->d_log->printf("PAsrc cb: f/b = %4ld\n", framesPerBuffer);
// copy from input buffer to ringbuffer
memcpy(self->d_writer->write_pointer(),
@@ -99,8 +99,8 @@ portaudio_source_callback (const void *inputBuffer,
}
else { // overrun
- if (LOGGING)
- self->d_log->printf("PAsrc cb: f/b = %4ld OVERRUN\n", framesPerBuffer);
+ //if (LOGGING)
+ // self->d_log->printf("PAsrc cb: f/b = %4ld OVERRUN\n", framesPerBuffer);
self->d_noverruns++;
::write(2, "aO", 2); // FIXME change to non-blocking call
@@ -144,8 +144,8 @@ audio_portaudio_source::audio_portaudio_source(int sampling_rate,
d_noverruns(0)
{
memset(&d_input_parameters, 0, sizeof(d_input_parameters));
- if (LOGGING)
- d_log = gri_logger::singleton();
+ //if (LOGGING)
+ // d_log = gri_logger::singleton();
PaError err;
int i, numDevices;
diff --git a/gr-audio-portaudio/src/audio_portaudio_source.h b/gr-audio-portaudio/src/audio_portaudio_source.h
index d14fe8058..3102db739 100644
--- a/gr-audio-portaudio/src/audio_portaudio_source.h
+++ b/gr-audio-portaudio/src/audio_portaudio_source.h
@@ -28,7 +28,7 @@
#include <string>
#include <portaudio.h>
#include <stdexcept>
-#include <gri_logger.h>
+//#include <gri_logger.h>
class audio_portaudio_source;
typedef boost::shared_ptr<audio_portaudio_source> audio_portaudio_source_sptr;
@@ -78,7 +78,7 @@ class audio_portaudio_source : public gr_sync_block {
// random stats
int d_noverruns; // count of overruns
- 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);