Evgeny F | 5 Sep 2008 12:18

Re: A question about libsox


At last I've managed to solve my problem using slightly different approach,
but thanks for your answer anyway, Chris.

There is another interesting thing I've run into during my experimentations.
In the libsox documentation where is one thing written about effect
handler's flow function:

"It processes the input buffer into the out-
put buffer, and sets the size variables to the num-
bers of samples actually processed.	It is under no
obligation  to  read from the input buffer or write
to the output buffer during the same call."

I've just added the following line at the beginning of output_flow() in
exaple1.c :
if (*isamp > 1024) *isamp = 1024;

I thought if my output handler processes only a portion of its input data,
it should work perfectly fine with the same results, only libsox framework
will call output_flow() few more times to process all the data.

But surprisingly I was wrong - exaple1 execution failed with "Premature EOF
on .wav input file" message. Looks confusing for me :)

--

-- 
View this message in context: http://www.nabble.com/A-question-about-libsox-tp19287511p19328440.html
Sent from the SoX mailing list archive at Nabble.com.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

Gmane