Re: [ecasound] ecasound and lua?

From: Kai Vehmanen <kvehmanen@email-addr-hidden>
Date: Wed Aug 18 2010 - 23:01:55 EEST


On Mon, 26 Jul 2010, Philipp √úberbacher wrote:

> One thing I couldn't find: How do I quit ecasound via net-eci?
> 'quit' quits only the connection, that much it did tell me :)

as Joel already replied, there's no command to terminate the server
process, but ecasound will terminate cleanly if sent SIGTERM (or SIGINT)

>>> There's also this line, from aio-status, which doesn't tell me a lot:
>>> -> closed, audio format not available until object is opened.
> This is still a bit confusing for me, no idea what it tries to tell me.

When the chainsetup is not connected, ecasound does not open any
external/resources (or at least tries very hard not to). So if you have
RIFF WAVE file as an input, at this point ecasound only knows it's a WAVE
file, but not until you the file gets opened (when issuing 'cs-connect'),
the RIFF headers are parsed and the file params are learnt (channels,
srate, etc, etc).

This only happens with inputs that "know" their audio params (e.g. any
audio file format with basic meta info, JACK (hardcode/systemwide settings
for sample format and sampling rate) and so forth).

> I spent most of today to hunt and squash a single bug. Almost
> frustrating :/
> I did find the problem and a rather ugly solution that I don't fully
> understand.
> The issue I have is ecasounds response when I send it a String
> containing nothing but "\r\n".
> It seems to send two responses, first:
> 256 0 -
> And then an empty string as a separate response. It may just be an
> additional <crlf><crlf>. Anyway, the response is different from others.

One good (and compact) example how to parse NetECI is
ecasound/ecatools/ecamonitor. It's under 300 lines of python implementing
a complete client talking via NetECI.

The NetECI parser is actually just one regex:
     m = re.match('256 ([0-9]{1,5}) (.+)\r\n(.*)\r\n\r\n.*', str, re.MULTILINE | re.S)

So indeed every reply terminates with two CRLFs (as per

This email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge

Ecasound-list mailing list
Received on Thu Aug 19 00:15:01 2010

This archive was generated by hypermail 2.1.8 : Thu Aug 19 2010 - 00:15:02 EEST