Re: [ecasound] Problems reinitializing ecasound via eci

New Message Reply Date view Thread view Subject view Author view Other groups

Subject: Re: [ecasound] Problems reinitializing ecasound via eci
From: Kai Vehmanen (k@eca.cx)
Date: Wed Aug 15 2001 - 02:58:48 EEST


On Sun, 12 Aug 2001, Remco Poelstra wrote:

> I let my program exit ecasound by calling eci_cleanup();
> When I then run eci_init(); it segfaults.
> Am I doing something wrong or am I forgetting something or?

Nope, you've found a bug in libecasoundc/ecasoundc.cpp, in
eci_cleanup() function. :) Fixed in CVS.

>
> int main(void){
> eci_init();
> eci_cleanup();
> eci_init();
> printf("%s\n","Test");
> eci_cleanup();
> return 0;
> }

If you need to have multiple ECI instances, I recommend using the
re-entrant functions (added in 2.0.1). Ie.:

--cut--
#include <ecasoundc.h>

int main(int argc, char *argv[])
{
  eci_handle_t* handle;

  handle = eci_init_r();
  eci_cleanup_r(handle);

  handle = eci_init_r();
  eci_cleanup_r(handle);

  return 0;
}
--cut--

-- 
 http://www.eca.cx
 Audio software for Linux!

-- To unsubscribe send message 'unsubscribe' in the body of the message to <ecasound-list-request@wakkanet.fi>.


New Message Reply Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Wed Aug 15 2001 - 02:57:29 EEST