From: Tom Rondeau Date: Wed, 24 Nov 2010 21:54:13 +0000 (-0500) Subject: Removing warnings in portaudio source/sink. X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=e5198a304a12410da8936a16900feba2fad1edae;hp=ff6ce4dcf7c602cd94f840de21034634c95af806;p=debian%2Fgnuradio Removing warnings in portaudio source/sink. --- diff --git a/gr-audio-portaudio/src/audio_portaudio_sink.cc b/gr-audio-portaudio/src/audio_portaudio_sink.cc index 9a3baf40..64e64ccf 100644 --- a/gr-audio-portaudio/src/audio_portaudio_sink.cc +++ b/gr-audio-portaudio/src/audio_portaudio_sink.cc @@ -102,7 +102,10 @@ portaudio_sink_callback (const void *inputBuffer, else { // underrun self->d_nunderuns++; - ::write(2, "aU", 2); // FIXME change to non-blocking call + ssize_t r = ::write(2, "aU", 2); // FIXME change to non-blocking call + if(r == -1) { + perror("audio_portaudio_source::portaudio_source_callback write error to stderr."); + } // FIXME we should transfer what we've got and pad the rest memset(outputBuffer, 0, nreqd_samples * sizeof(sample_t)); diff --git a/gr-audio-portaudio/src/audio_portaudio_source.cc b/gr-audio-portaudio/src/audio_portaudio_source.cc index 23801a8b..e508fda2 100644 --- a/gr-audio-portaudio/src/audio_portaudio_source.cc +++ b/gr-audio-portaudio/src/audio_portaudio_source.cc @@ -105,7 +105,10 @@ portaudio_source_callback (const void *inputBuffer, else { // overrun self->d_noverruns++; - ::write(2, "aO", 2); // FIXME change to non-blocking call + ssize_t r = ::write(2, "aO", 2); // FIXME change to non-blocking call + if(r == -1) { + perror("audio_portaudio_source::portaudio_source_callback write error to stderr."); + } self->d_ringbuffer_ready = false; self->d_ringbuffer_cond.notify_one(); // Tell the sink to get going!