diff options
author | Martin Braun <martin.braun@ettus.com> | 2020-08-13 15:08:08 +0200 |
---|---|---|
committer | Martin Braun <martin@gnuradio.org> | 2020-08-14 04:11:26 -0700 |
commit | 3adb522b0ddf6736605beea797016353a1d4a2b8 (patch) | |
tree | 6ba82c0bd96ac2a4461d13f61095f5d9afaeb13c /gr-fft | |
parent | digital/qa_header: Remove manual memory management (diff) | |
download | gnuradio-3adb522b0ddf6736605beea797016353a1d4a2b8.tar.xz gnuradio-3adb522b0ddf6736605beea797016353a1d4a2b8.zip |
fft: window: Provide default value for beta param on window::build
The API call fft::window::build() takes a third parameter, beta, that
only applies for the Kaiser window. For other windows, it is necessary
to provide a dummy value to call this function.
The declared-deprecated version firdes::window() on the other hand does
not require specifying beta when not needed. Instead, we provide
a default value of 6.76 which will still generate a valid (and generally
useful) Kaiser window, but means we don't have to specify beta for other
windows.
Diffstat (limited to 'gr-fft')
-rw-r--r-- | gr-fft/include/gnuradio/fft/window.h | 2 | ||||
-rw-r--r-- | gr-fft/python/fft/bindings/window_python.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/gr-fft/include/gnuradio/fft/window.h b/gr-fft/include/gnuradio/fft/window.h index efb34fccf..0ab333e17 100644 --- a/gr-fft/include/gnuradio/fft/window.h +++ b/gr-fft/include/gnuradio/fft/window.h @@ -332,7 +332,7 @@ public: * \param ntaps Number of coefficients in the window. * \param beta Used only for building Kaiser windows. */ - static std::vector<float> build(win_type type, int ntaps, double beta); + static std::vector<float> build(win_type type, int ntaps, double beta = 6.76); }; } /* namespace fft */ diff --git a/gr-fft/python/fft/bindings/window_python.cc b/gr-fft/python/fft/bindings/window_python.cc index ffde426cb..51dd7200d 100644 --- a/gr-fft/python/fft/bindings/window_python.cc +++ b/gr-fft/python/fft/bindings/window_python.cc @@ -175,7 +175,7 @@ void bind_window(py::module& m) &window::build, py::arg("type"), py::arg("ntaps"), - py::arg("beta"), + py::arg("beta") = 6.76, D(window, build)) ; |