Re: [ecasound] ecasound and lua?

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

Hi,

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)
signal.

>>> 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:
--cut--
     m = re.match('256 ([0-9]{1,5}) (.+)\r\n(.*)\r\n\r\n.*', str, re.MULTILINE | re.S)
--cut--

So indeed every reply terminates with two CRLFs (as per
http://eca.cx/ecasound/Documentation/programmers_guide/ecasound_programmers_guide.html#ecasound-interactive-mode-well-formed-output-mode
)

------------------------------------------------------------------------------
This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev

_______________________________________________
Ecasound-list mailing list
Ecasound-list@email-addr-hidden
https://lists.sourceforge.net/lists/listinfo/ecasound-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