projects
/
debian
/
gnuradio
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removing warnings in portaudio source/sink.
[debian/gnuradio]
/
gr-audio-portaudio
/
src
/
audio_portaudio_sink.cc
diff --git
a/gr-audio-portaudio/src/audio_portaudio_sink.cc
b/gr-audio-portaudio/src/audio_portaudio_sink.cc
index 65a38f9119011f4dc96bd66bc1a6a71e7bb08023..64e64ccf4536a3fdcb8b649ba0557234b41dd9e9 100644
(file)
--- a/
gr-audio-portaudio/src/audio_portaudio_sink.cc
+++ b/
gr-audio-portaudio/src/audio_portaudio_sink.cc
@@
-1,6
+1,6
@@
/* -*- c++ -*- */
/*
/* -*- c++ -*- */
/*
- * Copyright 2006 Free Software Foundation, Inc.
+ * Copyright 2006
,2010
Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
*
* This file is part of GNU Radio
*
@@
-102,7
+102,10
@@
portaudio_sink_callback (const void *inputBuffer,
else { // underrun
self->d_nunderuns++;
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));
// FIXME we should transfer what we've got and pad the rest
memset(outputBuffer, 0, nreqd_samples * sizeof(sample_t));
@@
-120,7
+123,7
@@
portaudio_sink_callback (const void *inputBuffer,
audio_portaudio_sink_sptr
audio_portaudio_make_sink (int sampling_rate, const std::string dev, bool ok_to_block)
{
audio_portaudio_sink_sptr
audio_portaudio_make_sink (int sampling_rate, const std::string dev, bool ok_to_block)
{
- return
audio_portaudio_sink_sptr
(new audio_portaudio_sink (sampling_rate,
+ return
gnuradio::get_initial_sptr
(new audio_portaudio_sink (sampling_rate,
dev, ok_to_block));
}
dev, ok_to_block));
}