Subject: Re: [ecasound] ECI more or less ready for use
From: Kai Vehmanen (email@example.com)
Date: Mon Dec 11 2000 - 20:30:57 EET
On Sun, 10 Dec 2000, S. Massy wrote:
> But suppose an error that can't be expected, one that occurs while the
> processing is going on. Huh... let's say you have a "device is full"
> error. I don't know how ecasound handles this currently as I've never
> been confronted to this very error, but how could this case be handled
> through the ECI?
Ouch. :) You just hit a weak spot in ecasound. Ecasound audio objects have
only one status flag, 'finished()'. According to class docs:
* Whether all data has been processed? If opened in mode 'io_read',
* this means that end of stream has been reached. If opened in
* 'io_write' or 'io_readwrite' modes, finished status usually
* means that an error has occured (no space left, etc). After
* finished() has returned 'true', further calls to read_buffer()
* and/or write_buffer() won't process any data.
* For inputs for which 'finite_length_stream()' is true, when
* 'finished()' returns true, that means an error has occured.
* Otherwise 'finished()' just tells that further attempts to do
* i/o will fail.
virtual bool finished(void) const = 0;
.. but the problem is that for output objects, this condition is never
checked. So if you run out of disk space, ecasound will just silently
fail. This causes all kinds of problems with ecatools and ecawave. Hmm,
but how should we fix this... one possibility would be to add another
engine-state. Now we have "not ready" (engine thread not started)",
"stopped" (not running), "running" (we are processing data) and "finished"
(engine has been running, and now all inputs are in "finished" state). I
guess we could add a new state "error". This would mean that some output
object has return "finished" status (--> error!).
But another question is whether we need an event for this. At least if
implemented using the new "error" status, "run" command would still
Still, although it now seems that events and extensive error handling
won't be included in ECI, it's possible to add them later. After we have
some apps using the ECI API, it's easier to see what is needed and what is
-- . http://www.eca.cx ... [ audio software for linux ] /\ . . http://www.eca.cx/sculpscape [ my armchair-tunes mp3/ra/wav ]
-- To unsubscribe send message 'unsubscribe' in the body of the message to <firstname.lastname@example.org>.
This archive was generated by hypermail 2b28 : Mon Dec 11 2000 - 19:41:02 EET