[linux-audio-dev] So difficult
fons.adriaensen at alcatel.be
Tue Feb 1 15:31:53 UTC 2005
On Tue, Feb 01, 2005 at 04:57:17PM +0200, Juhana Sadeharju wrote:
> For each parameter I have the following functions:
> -a GUI callback (e.g., slider)
> -jackgverb_set() and jackgverb_get() called in the GUI callbacks
> -gverb_set() and gverb_get() called in jackgverb_set/get()
What sort of braindead toolkit is forcing you to have separate
callbacks for each slider ?
> What would help? If nobody figures out anything, I could draw the
> reverb design on a small piece of paper and then somebody else
> may torture himself in coding.
After 14/02 I might be interested to do that. BTW, I also have a jack
reverb (3D-Ambisonic) waiting to be polished a bit before release.
> Are there coding patterns which would make my C code simpler?
Probably depends on your toolkit. The home-grown thing I use
gives each slider an int callback_id, which you can use in a
switch or even as an array index. One fuction for all sliders.
For this sort of thing, I normally use a very simple interface
with the audio code: just an array of floats together with a bit
field saying which ones have changed. There is also a limit on
the number of updates per second.
It's then up to the audio code to determine how it recalculates
its internal parameters. For reverbs, you often have internal
values that depend on many user parameters, and this arrangment
allows the reverb code to optimise this calculations.
More information about the Linux-audio-dev