Re: [ecasound] ECI more or less ready for use

New Message Reply Date view Thread view Subject view Author view Other groups

Subject: Re: [ecasound] ECI more or less ready for use
From: Kai Vehmanen (k@eca.cx)
Date: Mon Dec 11 2000 - 00:25:14 EET


On Fri, 8 Dec 2000, S. Massy wrote:

> I browsed ecasoundc.h quickly and I was wondering:
> isn't eci_last_error() rendered obsolete by the event system? And if
> not so, shouldn't there be something like a eci_error_index() to mak

Hmm, it might if there was an event system. :) Seriously, I'm still
not sure about the whole event-system idea. I've included a few event
related functions to the API, just to remind me of the issue, but at the
time events_available() always return 'false'.

It just seems that all possible events that happen inside ecasound are
closely tied to actions that come from the user/ECI-app. You can think of
ecasound as a deterministic machine that does exactly what you tell it to
do. Nothing unexcepted can happen. Now if you compare this to traditional
event-systems like GUI-libraries, they're far from deterministic. User
clicking the widgets is causing the events to happen. With ecasound, users
or any other outside "actors" can't affect ecasound's status. The only
real ecasound event is still the "processing_finished" event that is
covered by the EIAM "run" command.

Now as for error handling, it's another very difficult area of interface
design. If we wanted to use error types (assigned to integers or
something), we'd need to specify a huge number of different error types
(and maintain these lists in all implementations). And do you really need
this information? If an error has happenend, you can usually determinate
the cause from the context. Verbose error messages are mainly there for
helping to develop the ECI app, not necessarily for runtime error
handling. So my idea is this:

--cut--
e.command("c-select 1,2,3")
if len(e.last_error()) > 0:
        print "Error while selecting chains 1, 2 and 3!"
else:
        print "Succesfully selected chains 1, 2 and 3."
e.command("c-selected")
print "I'm paranoid so let's check what chains ecasound thinks is select:" , e.last_string_list()
--cut--

Should there be more error-handling related services or do
you think is this enough?

-- 
 . 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 <ecasound-list-request@wakkanet.fi>.


New Message Reply Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Sun Dec 10 2000 - 23:35:03 EET