Re: [ecasound] Possible inconsistency between libecasoundc and NetECI

From: Kai Vehmanen <kvehmanen@email-addr-hidden>
Date: Sun Oct 11 2009 - 13:35:40 EEST


On Sat, 10 Oct 2009, Joel Roth wrote:

> If I issue 'int-cmd-list' via NetECI, the commands are
> separated by commas, as per the specification in 'man
> ecasound-iam'. I get the same result if I issue the command
> in interactive mode Ecasound.

hmm, 'int-cmd-list' returns a list of strings, so commas are not
necessarily used as separators.

> However, I find that if I issue 'int-cmd-list' via libecasoundc
> (via Audio::Ecasound), the commands in the return string
> are separated by spaces.

The C ECI API allows to access each string list item separately via
'eci_last_string_list_item(int n)', and the low-level Audio::Ecasound
seems to provide these as well (eci_last_string_list* functions). But it
would seem eci() function in Audio::Ecasound returns string lists a bit

E.g. the relevant code in
    } elsif($type eq 'S') {
         my $count = $self->last_string_list_count();
         # differentiate from () err when ambiguous
         return ('') unless ($count && $self->on_error);
         my @ret;
         for my $n (0..$count-1) {
             push @ret, $self->last_string_list_item($n);
         return @ret;

.. so commas are not used as a separator, but instead an array of items is
returned (and assuming I'm deciphering the perl logic correctly, the
return value is a normal perl array).

But yeah, a bit confusing, but AFAIK still following the ECI docs. What do
you think..?

Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
Ecasound-list mailing list
Received on Sun Oct 11 16:15:01 2009

This archive was generated by hypermail 2.1.8 : Sun Oct 11 2009 - 16:15:01 EEST