Re: [ecasound] ecasound_sa

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

Subject: Re: [ecasound] ecasound_sa
From: Kai Vehmanen (k_AT_eca.cx)
Date: Thu Oct 31 2002 - 22:05:45 EET


On Thu, 31 Oct 2002, Tony Leake wrote:

> creating a test.c file that simply contains a main function with these 2
> lines
> eci_init();
> eci_command("cs-list");
[...]
> * A null client handle detected. This is usually caused by a bug
> * in the ECI application. Please report this bug to the author of

This means that eci_init() failed for some reason. Unfortunately, the
older non-reentrant API functions don't offer any mechanism to report
errors. I'll try to come with some way to detect these.

Anyways, it's probably better to use the _r functions:

eci_handle_t handle;
handle = eci_init()
if (handle == NULL) {
    fprintf(stderr, "eca_init() failed!\n");
}
else {
    ...
}

...

> test: ecasoundc_sa.c:634: eci_impl_check_handle: Assertion `eci_rep !=
> ((void *)0)' failed.
> Aborted (core dumped)

This is a consequence of calling: eci_command_r(handle, "cs-list"), where
handle is NULL.

Ecasoundc_sa currently performs two sanity checks in the init:

1) if after fork()'ing ecasound, it doesn't get any response
   from the pipe in 5 seconds, it will return NULL
   (ecasound not found in PATH, some other error in
   starting ecasound, etc)
2) if ecasound does not give valid response to
   "int-output-mode-wellformed", return NULL (this happens
   if an older version of ecasound is launched)

.. so either 1 or 2 has occured. If you are having trouble
with ecasoundc_sa, uncomment "#define ECI_ENABLE_DEBUG"
in ecasoundc_sa.c, and re-run make in libecasoundc.

-- 
 http://www.eca.cx
 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 : Thu Oct 31 2002 - 22:03:22 EET