Subject: Re: [ecasound] update: ECI API
From: Kai Vehmanen (firstname.lastname@example.org)
Date: Fri Dec 01 2000 - 04:29:47 EET
On Thu, 30 Nov 2000, janne halttunen wrote:
> Yihaa! Is the Python-thingie done with SWIG, handcoded, or what?
100% handcoded. The Python C APIs turned out to be well designed, so it
didn't take that long to grasp the basics. As the ECI is going to be a
small API, using a generator like SWIG would just make thing more complex.
Uhm, or so I hope. :)
> (from my point of view) An important question: can one have multiple instances of ECI to one engine?
> So that the ECIs would bombard the same engine, but have individual last_* -buffers?
Multiple instances, yes, but controlling the same engine, no. But that
shouldn't really be a problem...
So this would result in a==b. But you can do:
But of course, if you can come up with a scenario where the above doesn't
work, then we'll have to make a change. This "read_type + last_type" thing
is how all input/output is done in Eiffel (the programming language). I
remember when learning Eiffel, code written in this style looked really
ugly. But trust me, you'll get used to it. :)
If this happens to interest someone, use of read_+last_ is based on the
strict separation of observer and modifier functions. As Eiffel is a
"true" OO-language, all functions operate on some object. A function that
modifies object's state is a modifier, and it cannot return any value (C:
function returning void). All other functions are observers, and must not
modify object's state (C++: const member functions). So a function like
'fread()' is completely out of question as it both modifies the state of
the file-stream and returns the number of bytes read. Ok, ok, I'll stop
here. :) Anyway, this is _not_ the reason why read_+last_ is used in ECI -
just to give some background info.
> BTW, how would one find out in this ECI-scheme, is a chainsetup connected or not?
a = eci_last_integer()
if (a != 0) print("Connected!")
else print("Not connected!")
Maybe I'll add eci_last_bool()... not 100% sure yet. Anyway, this is the
standard mechanism for querying information with ECI. Of course, we must
add quite a few new ia-mode commands (observer funcs to be specific).
-- . http://www.eca.cx ... [ audio software for linux ] /\ . . http://www.eca.cx/aivastus ... [ aivastus net radio ] /\ .
-- To unsubscribe send message 'unsubscribe' in the body of the message to <email@example.com>.
This archive was generated by hypermail 2b28 : Fri Dec 01 2000 - 05:08:55 EET