Re: sox vs libmagic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I can imagine wanting to have SoX help determine types of files recovered from a drive without their original
names, but the two cases I've tried myself could not be identified via libmagic/file(1) anyway. (Oddly, in
fact, Winamp could play them even if at the wrong speed, whereas SoX considered them unplayable. The files were
Flacs without rate info according to the error I recall getting, and -r would not resolve the issue.)

On Tue, Sep 20, 2016 at 03:21:47PM +0200, Jan Stary wrote:
On Sep 20 11:32:15, mans@xxxxxxxxx wrote:
> Jan Stary <hans@xxxxxxxx> writes:
> 
> >> > Would anyone miss the libmagic functionality
> >> > if it was removed from SoX?
> >
> > On Sep 18 10:27:00, peterparker@xxxxxxxxxxxx wrote:
> >> A few other posters have commented to either enable or disable at
> >> compilation time. I am using sox a lot, but have never compiled it
> >> myself and would be happy if I hadn't to in the future to either enable
> >> or disable libmagic, whatever my preference would be.
> >
> > On Sep 19 15:51:53, mans@xxxxxxxxx wrote:
> >> Until someone can point to a specific problem the feature is causing,
> >> I see absolutely no reason for removing it.
> >
> > I think it goes the other way: there needs to be a specific reason to
> > have it in there.
> 
> It's already there, presumably because it was useful to someone.

That's exactly what I am asking: is anyone using it?
How exactly are you using it? When have you last used it?

> I'm against removing features merely because one person lacks the
> imagination to see their utility.  If the situation were reversed,
> someone sending a patch to add this feature, I'd be asking for examples
> of when it is needed.  Change without reason is always misguided.

Let's stop with the generalizations and "persons without imagination", OK?
I know what libmagic does. I just don't think that it is much useful in SoX.
How many misnamed or unrecognizable audio files have you encountered recently?
Zero, that's how many. And how did libmagic in SoX help you with that?
You can't tell, because you haven't used it. Tell me it's not true.

I am proposing to remove libmagic from SoX, because

1. It is of questionable utility. Next time you encounter
   a missnamed or unrecognizable audio file, just run file(1) on it.
   That's what file(1) is for. 

2. I haven't inspected the code closely, but it also seems that
   for the libmagic functionality to even happen, you need to call SoX
   with an explicit --magic. If that's the case, tell me:
   have you ever done that? No. So you are not using it anyway.

4. It would be one less dependency, and less code.

So far the only argument for it to stay is that it's already there.
IMHO that's not a reason for it to be there. Or, to paraphrase:
code without reason is always misguided.

Of course I can build my SoX --without-magic (and I do).
I just believe that it would be beneficial to SoX as
a piece of software to drop it entirely. It would be
smaller without really losing anything.

	Jan

-- 
Doug Lee                 dgl@xxxxxxxx                http://www.dlee.org
SSB BART Group           doug.lee@xxxxxxxxxxxxxxxx   http://www.ssbbartgroup.com
"There's no limit to what a man can do or where he can go if he
doesn't mind who gets the credit." Ronald Reagan?

------------------------------------------------------------------------------
_______________________________________________
Sox-users mailing list
Sox-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/sox-users



[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux