X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=gnuradio-core%2Fsrc%2Flib%2Ffilter%2Fgr_goertzel_fc.cc;fp=gnuradio-core%2Fsrc%2Flib%2Ffilter%2Fgr_goertzel_fc.cc;h=938a522f40217494396fd29f291e0ddae2f36c03;hb=f1878bbdc36a31c469364a73cfdf22ee74867f69;hp=a93751b2f09db8838923a884e9c27d9347a531bf;hpb=8bf0a196d9a3ab8780bf94396aaac9687f57702c;p=debian%2Fgnuradio diff --git a/gnuradio-core/src/lib/filter/gr_goertzel_fc.cc b/gnuradio-core/src/lib/filter/gr_goertzel_fc.cc index a93751b2..938a522f 100644 --- a/gnuradio-core/src/lib/filter/gr_goertzel_fc.cc +++ b/gnuradio-core/src/lib/filter/gr_goertzel_fc.cc @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2006,2010 Free Software Foundation, Inc. + * Copyright 2006,2010,2011 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -42,6 +42,8 @@ gr_goertzel_fc::gr_goertzel_fc(int rate, int len, float freq) d_goertzel(rate, len, freq) { d_len = len; + d_rate = rate; + d_freq = freq; } int gr_goertzel_fc::work(int noutput_items, @@ -58,3 +60,17 @@ int gr_goertzel_fc::work(int noutput_items, return noutput_items; } + +void +gr_goertzel_fc::set_freq(float freq) +{ + d_freq = freq; + d_goertzel.gri_setparms(d_rate, d_len, d_freq); +} + +void +gr_goertzel_fc::set_rate(int rate) +{ + d_rate = rate; + d_goertzel.gri_setparms(d_rate, d_len, d_freq); +}