Re: [ecasound] Possible inconsistency between libecasoundc and NetECI

From: Joel Roth <joelz@email-addr-hidden>
Date: Sun Oct 11 2009 - 20:05:58 EEST

On Sun, Oct 11, 2009 at 01:35:40PM +0300, Kai Vehmanen wrote:
> 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
> --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).

Ack. I should have looked myself.
> But yeah, a bit confusing, but AFAIK still following the ECI docs. What do
> you think..?

I'm embarrassed to say I didn't even look at my own code. <blush>

I was returning the result as "@result", in which
case Perl kindly joins the elements with spaces.

Adding to my confusion, I find that the *-register commands
use newline as a separator, which seems sensible enough.

ladspa-register returns output as _pairs_ of lines.

That's all okay with me. I look forward to the new
features and fixes of 2.7!


Joel Roth
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 20:15:06 2009

This archive was generated by hypermail 2.1.8 : Sun Oct 11 2009 - 20:15:06 EEST