Re: [ecasound] ecasound-2.5.2 does not allow commas in input file name

From: Sergei Steshenko <sergstesh@email-addr-hidden>
Date: Fri Apr 10 2009 - 22:06:36 EEST

--- On Fri, 4/10/09, Kai Vehmanen <kvehmanen@email-addr-hidden> wrote:

> From: Kai Vehmanen <kvehmanen@email-addr-hidden>
> Subject: Re: [ecasound] ecasound-2.5.2 does not allow commas in input file name
> To: "ecasound-list" <ecasound-list@email-addr-hidden>
> Date: Friday, April 10, 2009, 6:35 AM
> Hi,
>
> On Thu, 9 Apr 2009, Sergei Steshenko wrote:
>
> > I've noticed that ecasound-2.5.2 stops parsing input
> file at first comma,
> > i.e. given an
> > -i 'foo, bar.ext'
> >
> > input it will consider only "foo" to be its input
> sound object.
>
> yep, this is a known "feature" of ecasound parser -- a bit
> unfortunate
> one, but I don't know how to fix it without breaking
> backwards
> compatibility. This is mentioned in the BUGS file.
>
> Anyways, to pass arguments with commas in the parameter
> value (e.g. a
> filename), one has to quote it with either backslashes (-i
> foo\\,bar.wav)
> or with doublequotes (-i "foo,bar.wav").
>
> When using ecasound from a shell (e.g. bash), things get
> more complicated
> as the shell has special meanings for many of the same
> characters as well.
> So to pass a backslash to ecasound, you need to use "\\"
> (first one is
> removed by shell before ecasound sees it). Similarly, to
> pass a
> doublequote, you need to use \". So the above example
> issued from shell
> would be:
>
>   ecasound -i \"foo,bar.wav\" -o null
>
> To pass tabs and spaces, you need to get the shell to pass
> them as one
> command-line argument. So
>
>   ecasound -i foo\ bar.wav -o null
>   ecasound -i "foo bar.wav" -o null
>
> ... will both work.
>
> > "-i 'foo\, bar.ext'" is accepted and works as
> expected.
>
> Yes, that'll work. Shell will strip the single quotes
> (needed to pass
> the space) and ecasound will handle the \, quote.
>
> > I haven't yet built 2.6.* versions to verify how it
> works with them.
>
> It's the same in 2.6 and 2.7 snapshots..
>
>

The funny thing is that the nasty (with spaces, '[', ']', etc.) file name
was processed by

String::ShellQuote::shell_quote_best_effort

Perl module/subroutine which uses single quotes as the outer ones.

So, I had to add

s/\,/\\,/g;

to my code for ecasound to accept the file name. I.e. ecasound behaves
differently from bash for which String::ShellQuote::shell_quote_best_effort
is written.

I guess I can live with that.

Thanks,
  Sergei.

      

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Ecasound-list mailing list
Ecasound-list@email-addr-hidden
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Received on Sat Apr 11 00:15:01 2009

This archive was generated by hypermail 2.1.8 : Sat Apr 11 2009 - 00:15:01 EEST