Re: [ecasound] edi-28 - first implementation

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

Subject: Re: [ecasound] edi-28 - first implementation
From: Tony Leake (tony_leake_AT_hotmail.com)
Date: Tue Oct 22 2002 - 20:35:56 EEST


> > I have just discovered that I only have one way communication to a
>forked
> > process in PHP, so I won't be able to do anything with this untill thats
> > fixed. I was sure there was a workaround but it doesn't work.

>Yup, that is a common problem. Unfortunately the popen() C-lib function,
>which is the easiest way to fork+control a child process, only supports
>one-way communication. I, too, had to code around this in libecasoundc_sa
>using fork+exec+2xpipe()... Same thing probably needs to be done for the
>PHP module for popen().

Hi,

I'm still persevering with this but I've hit a wall. My plan is to write a
test script in c to work out how I would like things to work in php, then
extend the php language to have the extra c functions I need.

Here's what I'm trying.

create 2 pipes
fork
in the child process close stdin and std out, dup2() the pipes with stdin
and stdout
execve ecasound -c

so now theoretically my parent process can send and recieve command to
ecasound via the pipes. Once I have this working I will build pipe, dup2,
read and write into php.

If I understand this is how you intend libecasound_sa to be used but I have
a problem.

WHen I exec i seen to get a bunch of asterix's written to the pipe and then
it hangs. This seems to be the fist line of the header you get in -c mode
plus a line break and I more asterix. If I capture the outputinto a file and
look at it in vi there seems to be a control charachter i dont recognise.
This is what I see:
*^[[1m ecasound v2.2.0-pre3 (C) 1997-2002

I don't recognise that as a control sequence and I cant find out where this
message comes from within ecasound.

Any ideas?

Regards
Tony

_________________________________________________________________
Unlimited Internet access for only $21.95/month.  Try MSN!
http://resourcecenter.msn.com/access/plans/2monthsfree.asp


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

This archive was generated by hypermail 2b28 : Tue Oct 22 2002 - 20:33:31 EEST