Re: [ecasound] ruby-ecasound

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [ecasound] ruby-ecasound
From: Kai Vehmanen (
Date: Fri Nov 28 2003 - 01:41:57 EET

On Thu, 27 Nov 2003, Jan Weil wrote:

> Hmmm - my suggestion:
> For now that we stick with the native ECI I would say let's
> consequently move everything into one file called 'ecasound.rb'.
> But if we should ever decide to add my additional oo-layer I would
> really prefer seeing the subdir 'ecasound' reappear :)

Yes, this sounds good. First I thought we could have all the *.rb files in
the rubyecasound directory, and only add the subdir when installing the
files, but on a second thought, it is probably better to maintain the same
dir hierarchy in both places.

>>> checking would fail if you released 2.10 because "2.2" > "2.10" =>
> I fixed the version checking ("2.2.2" < "2.2.10" => true) but the
> current implementation requires that your version number is of the form
> major.minor.micro. Otherwise an exception is raised :)
> Is there any chance that your version numbering does not follow this
> scheme?

Hmm, this is a bit tricky, as Ecasound snapshots have versions such as
'x.y.z-snapshotYYYYMMDD'. So ideally you should discard all non-numerical
characters after '.micro'. This would cover variants such as:
    x.y.z.1 (not used yet, I could release these to add missing files,
             etc, not code-level changes)

> Well, this one is actually a little bit more complicated as Ruby does
> not have destructors because it does not use reference counting but
> garbage collection.
> I still have to think about this but for now there's never been a
> zombie for me so I won't send for one of them.

Hmm, ok, this is interesting. But I guess not a big problem. What should
happen is that when Ruby interpreter closes down, the pipes to ecasound
are broken, ecasound notices this, cleans up its resources and exits. This
is equivalent to the case:

   echo 'help' |ecasound -c

... ecasound immediately exits after processing 'help' as it notices the
pipe has been broken. Otherwise it would hang, waiting for more commands
from an input that is no longer there.

One possibly problematic case is if someone creates lots of instances of
'ControlInterface'. Without the finalize method in place, ecasound
sessions will only be cleaned when the whole Ruby app/interpreter exits.
This could lead to resource-usage problems...

> I prepared a diff (attached) which patches ecasound.rb, README and
> conforming to my suggestions.
> I did a 'cvs diff -up > patch' in the rubyecasound subdirectory so you
> will have to apply the patch in this directory.
> Additionally, you will have to 'cvs remove' contol-interface.rb.

Many thanks, these are all applied to CVS! Btw; you can also just send the
updated files. I probably won't be editing these files much myself, so
there is no real need for diffs. But whichever is easiest for you.

So, so, only thing missing now is the ECI guide chapter. ;)

 Audio software for Linux!

New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Fri Nov 28 2003 - 01:38:08 EET