reuk
July 17, 2021, 11:27am
21
Yes, the ArrayCoefficients functions are designed so that they do not need to allocate.
5amx
October 29, 2021, 6:09pm
22
Hello, could you share me an example about how are you declaring, preparing and using this new implementation? I couldn’t figure out how to use it correctly…
You can have a look at how I use them in one of my projects here:
/*
This file is part of the Schrammel OJD audio plugin.
Copyright (C) 2020 Janos Buttgereit
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
This file has been truncated. show original
They are also used in the official JUCE examples:
/*
==============================================================================
This file is part of the JUCE examples.
Copyright (c) 2020 - Raw Material Software Limited
The code included in this file is provided under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license. Permission
To use, copy, modify, and/or distribute this software for any purpose with or
without fee is hereby granted provided that the above copyright notice and
this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES,
WHETHER EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR
PURPOSE, ARE DISCLAIMED.
==============================================================================
*/
/*******************************************************************************
This file has been truncated. show original
Hope that helps
2 Likes
alatar
September 3, 2024, 8:03am
24
Thanks a lot for this thread.
I was not aware of the difference between IIR::Coefficients and IIR::ArrayCoefficients. And of course I used the wrong version
Maybe there should be a “jassert” added to the IIR::Coefficients makeXXX functions? I mean, there is no reason to use the versions which allocate on the heap I think? And/or add information in the documentation. Something along the lines “Warning: not safe to use in audio thread. Use ArrayCoefficients instead.”