diff options
author | Tom Rondeau | 2011-08-27 16:44:32 -0400 |
---|---|---|
committer | Tom Rondeau | 2011-08-27 16:44:32 -0400 |
commit | 54881f8803d4f796dde2af031e6f1a37df9445f1 (patch) | |
tree | b1e4e6c34004f22a29c03815ed3ae49065693dce /gnuradio-core | |
parent | 50cde24aea52d66d69313a490f7eab78a5085849 (diff) | |
parent | f4cc7884c608a7ec1969e68b73e12cdbcc26145c (diff) | |
download | gnuradio-54881f8803d4f796dde2af031e6f1a37df9445f1.tar.gz gnuradio-54881f8803d4f796dde2af031e6f1a37df9445f1.tar.bz2 gnuradio-54881f8803d4f796dde2af031e6f1a37df9445f1.zip |
Merge branch 'master' of gnuradio.org:gnuradio
Diffstat (limited to 'gnuradio-core')
18 files changed, 64 insertions, 14 deletions
diff --git a/gnuradio-core/src/lib/filter/gr_dc_blocker_cc.h b/gnuradio-core/src/lib/filter/gr_dc_blocker_cc.h index de9ccc0ea..d299cc7ef 100644 --- a/gnuradio-core/src/lib/filter/gr_dc_blocker_cc.h +++ b/gnuradio-core/src/lib/filter/gr_dc_blocker_cc.h @@ -79,7 +79,6 @@ class gr_dc_blocker_cc : public gr_sync_block * Build the DC blocker. * \param D (int) the length of the delay line * \param long_form (bool) whether to use long (true, default) or short form - * \param channel (unsigned integer) Selects the channel to return [default=0]. */ friend gr_dc_blocker_cc_sptr gr_make_dc_blocker_cc (int D, bool long_form); diff --git a/gnuradio-core/src/lib/filter/gr_dc_blocker_ff.h b/gnuradio-core/src/lib/filter/gr_dc_blocker_ff.h index b632d81da..8ffb6cf6f 100644 --- a/gnuradio-core/src/lib/filter/gr_dc_blocker_ff.h +++ b/gnuradio-core/src/lib/filter/gr_dc_blocker_ff.h @@ -79,7 +79,6 @@ class gr_dc_blocker_ff : public gr_sync_block * Build the DC blocker. * \param D (int) the length of the delay line * \param long_form (bool) whether to use long (true, default) or short form - * \param channel (unsigned integer) Selects the channel to return [default=0]. */ friend gr_dc_blocker_ff_sptr gr_make_dc_blocker_ff (int D, bool long_form); diff --git a/gnuradio-core/src/lib/filter/gr_single_pole_iir.h b/gnuradio-core/src/lib/filter/gr_single_pole_iir.h index da919b35c..8781065d4 100644 --- a/gnuradio-core/src/lib/filter/gr_single_pole_iir.h +++ b/gnuradio-core/src/lib/filter/gr_single_pole_iir.h @@ -71,7 +71,7 @@ public: d_prev_output = 0; } - o_type prev_output () { return d_prev_output; } + o_type prev_output () const { return d_prev_output; } protected: tap_type d_alpha; @@ -155,7 +155,7 @@ public: d_prev_output = 0; } - gr_complexd prev_output () { return d_prev_output; } + gr_complexd prev_output () const { return d_prev_output; } protected: double d_alpha; diff --git a/gnuradio-core/src/lib/filter/gri_goertzel.cc b/gnuradio-core/src/lib/filter/gri_goertzel.cc index 85e66c069..73b8366ab 100644 --- a/gnuradio-core/src/lib/filter/gri_goertzel.cc +++ b/gnuradio-core/src/lib/filter/gri_goertzel.cc @@ -20,6 +20,9 @@ * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #include <cmath> #include <gri_goertzel.h> diff --git a/gnuradio-core/src/lib/filter/qa_gri_mmse_fir_interpolator.cc b/gnuradio-core/src/lib/filter/qa_gri_mmse_fir_interpolator.cc index 63654a280..d158ff00d 100644 --- a/gnuradio-core/src/lib/filter/qa_gri_mmse_fir_interpolator.cc +++ b/gnuradio-core/src/lib/filter/qa_gri_mmse_fir_interpolator.cc @@ -20,6 +20,10 @@ * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <cppunit/TestAssert.h> #include <qa_gri_mmse_fir_interpolator.h> #include <gri_mmse_fir_interpolator.h> diff --git a/gnuradio-core/src/lib/general/gr_circular_file.cc b/gnuradio-core/src/lib/general/gr_circular_file.cc index c9222597a..4d88b9d99 100644 --- a/gnuradio-core/src/lib/general/gr_circular_file.cc +++ b/gnuradio-core/src/lib/general/gr_circular_file.cc @@ -42,6 +42,10 @@ #include <stdio.h> #include <string.h> +#ifdef HAVE_IO_H +#include <io.h> +#endif + static const int HEADER_SIZE = 4096; static const int HEADER_MAGIC = 0xEB021026; diff --git a/gnuradio-core/src/lib/general/gr_firdes.cc b/gnuradio-core/src/lib/general/gr_firdes.cc index 5d192d67e..13110d57d 100644 --- a/gnuradio-core/src/lib/general/gr_firdes.cc +++ b/gnuradio-core/src/lib/general/gr_firdes.cc @@ -20,6 +20,10 @@ * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <gr_firdes.h> #include <stdexcept> diff --git a/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.h b/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.h index a29acd628..df6de93d5 100644 --- a/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.h +++ b/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.h @@ -44,6 +44,8 @@ class gr_quadrature_demod_cf : public gr_sync_block float d_gain; public: + void set_gain(float gain) { d_gain = gain; } + float gain() const { return d_gain; } int work (int noutput_items, gr_vector_const_void_star &input_items, diff --git a/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.i b/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.i index fbd45dcf8..d9f338daa 100644 --- a/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.i +++ b/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.i @@ -27,4 +27,8 @@ gr_quadrature_demod_cf_sptr gr_make_quadrature_demod_cf (float gain); class gr_quadrature_demod_cf : public gr_sync_block { gr_quadrature_demod_cf (float gain); + +public: + void set_gain(float gain) { d_gain = gain; } + float gain() const { return d_gain; } }; diff --git a/gnuradio-core/src/lib/general/gr_random.cc b/gnuradio-core/src/lib/general/gr_random.cc index 67f760006..52140acc2 100644 --- a/gnuradio-core/src/lib/general/gr_random.cc +++ b/gnuradio-core/src/lib/general/gr_random.cc @@ -35,6 +35,9 @@ * */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #include <math.h> #include <gr_random.h> diff --git a/gnuradio-core/src/lib/general/gri_float_to_char.cc b/gnuradio-core/src/lib/general/gri_float_to_char.cc index a17b01f55..28f15a3b3 100644 --- a/gnuradio-core/src/lib/general/gri_float_to_char.cc +++ b/gnuradio-core/src/lib/general/gri_float_to_char.cc @@ -20,6 +20,10 @@ * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #define _ISOC9X_SOURCE #include <gri_float_to_char.h> #include <math.h> diff --git a/gnuradio-core/src/lib/general/gri_float_to_short.cc b/gnuradio-core/src/lib/general/gri_float_to_short.cc index 13afc51d9..93a2784f5 100644 --- a/gnuradio-core/src/lib/general/gri_float_to_short.cc +++ b/gnuradio-core/src/lib/general/gri_float_to_short.cc @@ -20,6 +20,10 @@ * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #define _ISOC9X_SOURCE #include <gri_float_to_short.h> #include <math.h> diff --git a/gnuradio-core/src/lib/general/gri_float_to_uchar.cc b/gnuradio-core/src/lib/general/gri_float_to_uchar.cc index 394cbc100..a022c95d8 100644 --- a/gnuradio-core/src/lib/general/gri_float_to_uchar.cc +++ b/gnuradio-core/src/lib/general/gri_float_to_uchar.cc @@ -20,6 +20,10 @@ * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #define _ISOC9X_SOURCE #include <gri_float_to_uchar.h> #include <math.h> diff --git a/gnuradio-core/src/lib/io/gr_file_descriptor_sink.cc b/gnuradio-core/src/lib/io/gr_file_descriptor_sink.cc index 09fb6c826..11e0a8eb9 100644 --- a/gnuradio-core/src/lib/io/gr_file_descriptor_sink.cc +++ b/gnuradio-core/src/lib/io/gr_file_descriptor_sink.cc @@ -34,6 +34,9 @@ #include <stdexcept> #include <stdio.h> +#ifdef HAVE_IO_H +#include <io.h> +#endif gr_file_descriptor_sink::gr_file_descriptor_sink (size_t itemsize, int fd) : gr_sync_block ("file_descriptor_sink", diff --git a/gnuradio-core/src/lib/io/gr_file_descriptor_source.cc b/gnuradio-core/src/lib/io/gr_file_descriptor_source.cc index 700ad4aef..334a57848 100644 --- a/gnuradio-core/src/lib/io/gr_file_descriptor_source.cc +++ b/gnuradio-core/src/lib/io/gr_file_descriptor_source.cc @@ -35,6 +35,9 @@ #include <stdio.h> #include <string.h> +#ifdef HAVE_IO_H +#include <io.h> +#endif gr_file_descriptor_source::gr_file_descriptor_source (size_t itemsize, int fd, diff --git a/gnuradio-core/src/lib/io/gr_tagged_file_sink.cc b/gnuradio-core/src/lib/io/gr_tagged_file_sink.cc index 154611c32..91618bad6 100644 --- a/gnuradio-core/src/lib/io/gr_tagged_file_sink.cc +++ b/gnuradio-core/src/lib/io/gr_tagged_file_sink.cc @@ -34,6 +34,10 @@ #include <iostream> #include <gr_tag_info.h> +#ifdef HAVE_IO_H +#include <io.h> +#endif + #ifdef O_BINARY #define OUR_O_BINARY O_BINARY #else diff --git a/gnuradio-core/src/lib/io/gri_wavfile.cc b/gnuradio-core/src/lib/io/gri_wavfile.cc index b8375edc2..8f1c6a2bb 100644 --- a/gnuradio-core/src/lib/io/gri_wavfile.cc +++ b/gnuradio-core/src/lib/io/gri_wavfile.cc @@ -160,25 +160,25 @@ gri_wavheader_parse(FILE *fp, return false; } - fread(&file_size, 1, 4, fp); + fresult = fread(&file_size, 1, 4, fp); fresult = fread(str_buf, 1, 8, fp); if (fresult != 8 || strncmp(str_buf, "WAVEfmt ", 8) || feof(fp)) { return false; } - fread(&fmt_hdr_skip, 1, 4, fp); + fresult = fread(&fmt_hdr_skip, 1, 4, fp); - fread(&compression_type, 1, 2, fp); + fresult = fread(&compression_type, 1, 2, fp); if (wav_to_host(compression_type) != VALID_COMPRESSION_TYPE) { return false; } - fread(&nchans, 1, 2, fp); - fread(&sample_rate, 1, 4, fp); - fread(&avg_bytes_per_sec, 1, 4, fp); - fread(&block_align, 1, 2, fp); - fread(&bits_per_sample, 1, 2, fp); + fresult = fread(&nchans, 1, 2, fp); + fresult = fread(&sample_rate, 1, 4, fp); + fresult = fread(&avg_bytes_per_sec, 1, 4, fp); + fresult = fread(&block_align, 1, 2, fp); + fresult = fread(&bits_per_sample, 1, 2, fp); if (ferror(fp)) { return false; @@ -204,7 +204,7 @@ gri_wavheader_parse(FILE *fp, return false; } - fread(&chunk_size, 1, 4, fp); + fresult = fread(&chunk_size, 1, 4, fp); if (ferror(fp)) { return false; } @@ -226,7 +226,9 @@ short int gri_wav_read_sample(FILE *fp, int bytes_per_sample) { int16_t buf = 0; - fread(&buf, bytes_per_sample, 1, fp); + size_t fresult; + + fresult = fread(&buf, bytes_per_sample, 1, fp); return (short) wav_to_host(buf); } diff --git a/gnuradio-core/src/lib/io/microtune_xxxx_eval_board.cc b/gnuradio-core/src/lib/io/microtune_xxxx_eval_board.cc index 668f04cad..14f2b8589 100644 --- a/gnuradio-core/src/lib/io/microtune_xxxx_eval_board.cc +++ b/gnuradio-core/src/lib/io/microtune_xxxx_eval_board.cc @@ -20,6 +20,10 @@ * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include "microtune_xxxx_eval_board.h" #include "microtune_eval_board_defs.h" #include "microtune_xxxx.h" |