Hallo, Tim Blechmann hat gesagt: // Tim Blechmann wrote:
On Tue, 16 Sep 2003 23:00:35 -0700 Miller Puckette mpuckett@man104-1.ucsd.edu wrote:
I think there's no way to find out overlap from within an extern. You can get blocksize by waiting around for DSP to start and looking at any signal input or output.
well and i figured out, that sys_getblksize() only works if dsp is switched on. if not it returns the default blocksize. so you can't run the function in the constructor of a class :-(
that makes it a bit difficult to write spectral processors...
I had a similar problem with the samplerate in my fluid~ external. fluid needs to know the samplerate when constructing its fluidsynth member instance. But SR isn't known until dsp is turned on. The partial "solution" I now implemented is an "init" method, which destroys and recreates the internal fluidsynth member instance with the current samplerate.
fluid_init is called in the constructor but can also be called by the user with an "init" message to fluid~.
ciao