summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/lib/io
diff options
context:
space:
mode:
authorJohnathan Corgan2012-04-07 19:32:10 -0700
committerJohnathan Corgan2012-04-07 19:32:10 -0700
commit9bef26c9271a7b9253075bda3c1fc7c8078c0343 (patch)
treea6c1329bb902c95c8ab9970f38ec5fb46d79167c /gnuradio-core/src/lib/io
parentf621a52f779381cfe550b4278b83e701a747944c (diff)
parentef72dc714840dfb8fe3f918dda243f74453b6cc7 (diff)
downloadgnuradio-9bef26c9271a7b9253075bda3c1fc7c8078c0343.tar.gz
gnuradio-9bef26c9271a7b9253075bda3c1fc7c8078c0343.tar.bz2
gnuradio-9bef26c9271a7b9253075bda3c1fc7c8078c0343.zip
Merge branch 'next'
Diffstat (limited to 'gnuradio-core/src/lib/io')
-rw-r--r--gnuradio-core/src/lib/io/.gitignore8
-rw-r--r--gnuradio-core/src/lib/io/Makefile.am116
-rw-r--r--gnuradio-core/src/lib/io/gr_message_source.i8
-rw-r--r--gnuradio-core/src/lib/io/gr_wavfile_sink.cc2
-rw-r--r--gnuradio-core/src/lib/io/gr_wavfile_sink.h14
5 files changed, 8 insertions, 140 deletions
diff --git a/gnuradio-core/src/lib/io/.gitignore b/gnuradio-core/src/lib/io/.gitignore
deleted file mode 100644
index a02b6ff73..000000000
--- a/gnuradio-core/src/lib/io/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-/Makefile
-/Makefile.in
-/.la
-/.lo
-/.deps
-/.libs
-/*.la
-/*.lo
diff --git a/gnuradio-core/src/lib/io/Makefile.am b/gnuradio-core/src/lib/io/Makefile.am
deleted file mode 100644
index 442d5e3a9..000000000
--- a/gnuradio-core/src/lib/io/Makefile.am
+++ /dev/null
@@ -1,116 +0,0 @@
-#
-# Copyright 2001,2003,2004,2006,2007,2008 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# 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 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-include $(top_srcdir)/Makefile.common
-
-
-AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(WITH_INCLUDES)
-
-noinst_LTLIBRARIES = libio.la
-
-
-libio_la_SOURCES = \
- gr_file_sink.cc \
- gr_file_sink_base.cc \
- gr_file_source.cc \
- gr_file_descriptor_sink.cc \
- gr_file_descriptor_source.cc \
- gr_histo_sink_f.cc \
- gr_message_sink.cc \
- gr_message_source.cc \
- gr_oscope_guts.cc \
- gr_oscope_sink_f.cc \
- gr_oscope_sink_x.cc \
- i2c.cc \
- i2c_bitbang.cc \
- i2c_bbio.cc \
- i2c_bbio_pp.cc \
- microtune_4702.cc \
- microtune_4937.cc \
- microtune_4702_eval_board.cc \
- microtune_4937_eval_board.cc \
- microtune_xxxx.cc \
- microtune_xxxx_eval_board.cc \
- ppio.cc \
- ppio_ppdev.cc \
- sdr_1000.cc \
- gr_udp_sink.cc \
- gr_udp_source.cc \
- gr_wavfile_sink.cc \
- gr_wavfile_source.cc \
- gri_wavfile.cc \
- gr_tagged_file_sink.cc
-
-grinclude_HEADERS = \
- gr_file_sink.h \
- gr_file_sink_base.h \
- gr_file_source.h \
- gr_file_descriptor_sink.h \
- gr_file_descriptor_source.h \
- gr_histo_sink_f.h \
- gr_message_sink.h \
- gr_message_source.h \
- gr_oscope_guts.h \
- gr_oscope_sink_f.h \
- gr_oscope_sink_x.h \
- gr_trigger_mode.h \
- i2c.h \
- i2c_bitbang.h \
- i2c_bbio.h \
- i2c_bbio_pp.h \
- microtune_4702.h \
- microtune_4937.h \
- microtune_4702_eval_board.h \
- microtune_4937_eval_board.h \
- microtune_eval_board_defs.h \
- microtune_xxxx.h \
- microtune_xxxx_eval_board.h \
- ppio.h \
- ppio_ppdev.h \
- sdr_1000.h \
- gr_udp_sink.h \
- gr_udp_source.h \
- gr_wavfile_source.h \
- gr_wavfile_sink.h \
- gri_wavfile.h \
- gr_tagged_file_sink.h
-
-swiginclude_HEADERS = \
- io.i \
- gr_file_sink.i \
- gr_file_sink_base.i \
- gr_file_source.i \
- gr_file_descriptor_sink.i \
- gr_file_descriptor_source.i \
- gr_histo_sink.i \
- gr_message_sink.i \
- gr_message_source.i \
- gr_oscope_sink.i \
- microtune_xxxx_eval_board.i \
- microtune_4702_eval_board.i \
- microtune_4937_eval_board.i \
- ppio.i \
- sdr_1000.i \
- gr_udp_sink.i \
- gr_udp_source.i \
- gr_wavfile_source.i \
- gr_wavfile_sink.i \
- gr_tagged_file_sink.i
diff --git a/gnuradio-core/src/lib/io/gr_message_source.i b/gnuradio-core/src/lib/io/gr_message_source.i
index e4e2016d0..8a9c762d0 100644
--- a/gnuradio-core/src/lib/io/gr_message_source.i
+++ b/gnuradio-core/src/lib/io/gr_message_source.i
@@ -22,14 +22,6 @@
GR_SWIG_BLOCK_MAGIC(gr,message_source);
-#ifdef SWIGGUILE
-// Rename these. Without this, the primitive bindings are OK, but the
-// goops bindings try to create a bogus generic-function...
-// See core.scm for the second part of the workaround.
-%rename(message_source_limit_ctor) gr_make_message_source(size_t itemsize, int msgq_limit);
-%rename(message_source_msgq_ctor) gr_make_message_source(size_t itemsize, gr_msg_queue_sptr msgq);
-#endif
-
gr_message_source_sptr gr_make_message_source (size_t itemsize, int msgq_limit=0);
gr_message_source_sptr gr_make_message_source (size_t itemsize, gr_msg_queue_sptr msgq);
diff --git a/gnuradio-core/src/lib/io/gr_wavfile_sink.cc b/gnuradio-core/src/lib/io/gr_wavfile_sink.cc
index a96aadc72..88b232343 100644
--- a/gnuradio-core/src/lib/io/gr_wavfile_sink.cc
+++ b/gnuradio-core/src/lib/io/gr_wavfile_sink.cc
@@ -184,6 +184,7 @@ gr_wavfile_sink::work (int noutput_items,
int nwritten;
+ gruel::scoped_lock guard(d_mutex); // hold mutex for duration of this block
do_update(); // update: d_fp is reqd
if (!d_fp) // drop output on the floor
return noutput_items;
@@ -254,7 +255,6 @@ gr_wavfile_sink::do_update()
return;
}
- gruel::scoped_lock guard(d_mutex); // hold mutex for duration of this block
if (d_fp) {
close_wav();
}
diff --git a/gnuradio-core/src/lib/io/gr_wavfile_sink.h b/gnuradio-core/src/lib/io/gr_wavfile_sink.h
index 348f789ae..6d06d74e9 100644
--- a/gnuradio-core/src/lib/io/gr_wavfile_sink.h
+++ b/gnuradio-core/src/lib/io/gr_wavfile_sink.h
@@ -86,6 +86,13 @@ private:
short convert_to_short(float sample);
/*!
+ * \brief If any file changes have occurred, update now. This is called
+ * internally by work() and thus doesn't usually need to be called by
+ * hand.
+ */
+ void do_update();
+
+ /*!
* \brief Writes information to the WAV header which is not available
* a-priori (chunk size etc.) and closes the file. Not thread-safe and
* assumes d_fp is a valid file pointer, should thus only be called by
@@ -108,13 +115,6 @@ public:
void close();
/*!
- * \brief If any file changes have occurred, update now. This is called
- * internally by work() and thus doesn't usually need to be called by
- * hand.
- */
- void do_update();
-
- /*!
* \brief Set the sample rate. This will not affect the WAV file
* currently opened. Any following open() calls will use this new
* sample rate.