summaryrefslogtreecommitdiff
path: root/gr-digital/lib/clock_recovery_mm_ff_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gr-digital/lib/clock_recovery_mm_ff_impl.cc')
-rw-r--r--gr-digital/lib/clock_recovery_mm_ff_impl.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/gr-digital/lib/clock_recovery_mm_ff_impl.cc b/gr-digital/lib/clock_recovery_mm_ff_impl.cc
index 652a1fcfa2..d6a0958932 100644
--- a/gr-digital/lib/clock_recovery_mm_ff_impl.cc
+++ b/gr-digital/lib/clock_recovery_mm_ff_impl.cc
@@ -36,8 +36,7 @@ clock_recovery_mm_ff_impl::clock_recovery_mm_ff_impl(
d_gain_mu(gain_mu),
d_gain_omega(gain_omega),
d_omega_relative_limit(omega_relative_limit),
- d_last_sample(0),
- d_interp(new filter::mmse_fir_interpolator_ff())
+ d_last_sample(0)
{
if (omega < 1)
throw std::out_of_range("clock rate must be > 0");
@@ -49,7 +48,7 @@ clock_recovery_mm_ff_impl::clock_recovery_mm_ff_impl(
enable_update_rate(true); // fixes tag propagation through variable rate block
}
-clock_recovery_mm_ff_impl::~clock_recovery_mm_ff_impl() { delete d_interp; }
+clock_recovery_mm_ff_impl::~clock_recovery_mm_ff_impl() {}
void clock_recovery_mm_ff_impl::forecast(int noutput_items,
gr_vector_int& ninput_items_required)
@@ -57,7 +56,7 @@ void clock_recovery_mm_ff_impl::forecast(int noutput_items,
unsigned ninputs = ninput_items_required.size();
for (unsigned i = 0; i < ninputs; i++)
ninput_items_required[i] =
- (int)ceil((noutput_items * d_omega) + d_interp->ntaps());
+ (int)ceil((noutput_items * d_omega) + d_interp.ntaps());
}
void clock_recovery_mm_ff_impl::set_omega(float omega)
@@ -75,14 +74,14 @@ int clock_recovery_mm_ff_impl::general_work(int noutput_items,
const float* in = (const float*)input_items[0];
float* out = (float*)output_items[0];
- int ii = 0; // input index
- int oo = 0; // output index
- int ni = ninput_items[0] - d_interp->ntaps(); // don't use more input than this
+ int ii = 0; // input index
+ int oo = 0; // output index
+ int ni = ninput_items[0] - d_interp.ntaps(); // don't use more input than this
float mm_val;
while (oo < noutput_items && ii < ni) {
// produce output sample
- out[oo] = d_interp->interpolate(&in[ii], d_mu);
+ out[oo] = d_interp.interpolate(&in[ii], d_mu);
mm_val = slice(d_last_sample) * out[oo] - slice(out[oo]) * d_last_sample;
d_last_sample = out[oo];