|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, two versions of the `qtwidget` functions existed,
`qwidget()` and `pyqwidget()`, with the only difference being that
`qwidget()` returned a pointer to the `QWidget` object managed by the
corresponding block, while `pyqwidget()` returned that same pointer, but as
an integer (Or `PyLong` in this case).
While `qwidget()` is used by C++ code accessing the widgets,
`pyqwidget()` is only used for the python interface. This makes these
two methods redundant, thus this commit entirely removes `pyqwidget()`,
and modifies the `qwidget()` python wrapper to behave like
`pyqwidget()`. Note that we can be fairly confident that this change
will not effect potential users of `qwidget()`, because any invocation
on the objects previously returned by `qwidget()` would cause a
segmentation fault.
This commit also fixes a memory leak:
Internally, the `pyqwidget()` functions were returning a PyLong `PyObject *`,
which was then upwrapped in a pybind trampoline without decrementing
the reference count of that python object.
Signed-off-by: David Winter <david.winter@analog.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When switching between window functions in a live FFT GUI session, the
difference in power of the window functions is notable. This allows
asserting the 'normalize' argument of fft::window::build() by setting a
bit in the window type during construction,, or by calling a new API
call: set_fft_window_normalized().
Note: The choice to use an unused bit to set the normalization comes
from an attempt to keep the API backward compatible. Adding a new
argument to the make call would require reordering the make arguments.
This feature allows changing window types without signal power varying
due to window power differences.
Note that this does not affect scalloping loss, or processing loss from
the window. For example, the peak value of a sine tone will still vary
for different windows, because different windows distribute the power
differently, and most window functions move power to the sidelobes.
|