Re: sfront development

From: Philippe Goutier (ph.goutier@demeter.fr)
Date: Tue Sep 14 1999 - 03:51:00 EDT


>>Is the sample block size always the same for each call to process or processReplacing?

No. Usually, it will be the same, but not at the
end (eg. at the end of streaming a file, for the
remaining samples). Also, it might not be the same
for the first call to process/processReplacing.
This depends on the host.

>> Can one reliably discover the size before beginning processing?

The member AudioEffect::blockSize holds the
_maximum_ value (because the host calls the
function AudioEffect::setBlockSize early). This
allows you to allocate your buffers eg. when
resume() is called.

>> Can the size be ensured to be a power of 2?

I don't think it's specified anywhere, but
AudioEffect::blockSize should be so.

This being said, doing what you want is possible
by doing some buffering. Basically, that means you
have to specify a delay X (eg. 2048 samples) (see
AEffect::initialDelay) and gather as many samples
as you need (X) before processing them. The first
X processed samples samples will be ignored by the
host in that case.

Philippe



This archive was generated by hypermail 2b29 : Mon Jan 28 2002 - 11:46:35 EST