Re: [ecasound] Possible inconsistency between libecasoundc and NetECI
Brought to you by:
kaiv
|
From: Kai V. <kve...@ec...> - 2009-10-11 10:39:08
|
Hi,
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
differently.
E.g. the relevant code in Ecasound.pm:
--cut--
} 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;
--cut--
.. 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..?
|