[ecasound] ECI C impl. changes

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

Subject: [ecasound] ECI C impl. changes
From: Kai Vehmanen (k@eca.cx)
Date: Mon Jun 04 2001 - 23:07:08 EEST

Here's the first API change since the 2.0.0 release. Aymeric Jeanneau sent
me a reentrant C ECI implementation and I've just merged it into the
CVS-tree (-> libecasoundc). This change does not break compatibility with
binaries compiled against the older libecasoundc (see
libecasoundc/ChangeLog for details).

While adding the new routines I noticed a nasty bug in the current ECI
implementation. It seems that compiling any ECI apps against
libecasound_debug (--enable-debug) results in completely broken

I've traced the problem to C++ exceptions (once again), and my fancy
'definition by contract' system (...which uses exceptions). I've now
changed the CVS-tree so that --enable-debug does not automatically define
--enable-dbc. With this change, linking ECI apps against libecasound_debug
now works flawlessly... so I wouldn't recommend using --enable-dbc for

Now back to the reentrant libecasoundc... here's the new header file


#ifdef __cplusplus
extern "C" {

/* ---------------------------------------------------------------------
 * Reference on object
typedef void * eci_handle_t;

/* ---------------------------------------------------------------------
 * Constructing and destructing

void eci_init(void);
eci_handle_t eci_init_r(void);

void eci_cleanup(void);
void eci_cleanup_r(eci_handle_t p);
/* ---------------------------------------------------------------------
 * Issuing EIAM commands

void eci_command(const char* cmd);
void eci_command_r(eci_handle_t p, const char* cmd);

void eci_command_float_arg(const char*, double arg);
void eci_command_float_arg_r(eci_handle_t p, const char*, double arg);

/* ---------------------------------------------------------------------
 * Getting return values

int eci_last_string_list_count(void);
int eci_last_string_list_count_r(eci_handle_t p);

const char* eci_last_string_list_item(int n);
const char* eci_last_string_list_item_r(eci_handle_t p, int n);

const char* eci_last_string(void);
const char* eci_last_string_r(eci_handle_t p);

double eci_last_float(void);
double eci_last_float_r(eci_handle_t p);

int eci_last_integer(void);
int eci_last_integer_r(eci_handle_t p);

long int eci_last_long_integer(void);
long int eci_last_long_integer_r(eci_handle_t p);

const char* eci_last_error(void);
const char* eci_last_error_r(eci_handle_t p);

const char* eci_last_type(void);
const char* eci_last_type_r(eci_handle_t p);

int eci_error(void);
int eci_error_r(eci_handle_t p);
/* ---------------------------------------------------------------------
 * Events

int eci_events_available(void);
int eci_events_available_r(eci_handle_t p);

void eci_next_event(void);
void eci_next_event_r(eci_handle_t p);

const char* eci_current_event(void);
const char* eci_current_event_r(eci_handle_t p);

#ifdef __cplusplus


 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 : Mon Jun 04 2001 - 23:08:36 EEST