From e22224454f63be561fa2a5923d35b65ba403b6ac Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Fri, 30 Apr 2010 18:22:41 -0700 Subject: [PATCH] Add missing buffer allocator hint to gr_ofdm_sampler.cc This change was needed because gr_ofdm_sampler derives directly from gr_block, but functions (from the runtime's point of view) as a decimator. It takes many items in to produce a single output item. Without this change, values of fft_size > ~4096 would result in the scheduler complaining that it could never fullfil the block's request for samples. When deriving from gr_sync_interpolator or gr_sync_decimator, their constructors set the hint automatically. --- gnuradio-core/src/lib/general/gr_ofdm_sampler.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnuradio-core/src/lib/general/gr_ofdm_sampler.cc b/gnuradio-core/src/lib/general/gr_ofdm_sampler.cc index 74bd65a5..7f6b2b01 100644 --- a/gnuradio-core/src/lib/general/gr_ofdm_sampler.cc +++ b/gnuradio-core/src/lib/general/gr_ofdm_sampler.cc @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2007,2008 Free Software Foundation, Inc. + * Copyright 2007,2008,2010 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -45,6 +45,7 @@ gr_ofdm_sampler::gr_ofdm_sampler (unsigned int fft_length, gr_make_io_signature2 (2, 2, sizeof (gr_complex)*fft_length, sizeof(char)*fft_length)), d_state(STATE_NO_SIG), d_timeout_max(timeout), d_fft_length(fft_length), d_symbol_length(symbol_length) { + set_relative_rate(1.0/(double) fft_length); // buffer allocator hint } void -- 2.30.2