[Flac-dev] Re: [Flac-dev]: flac and pipes problems (was: Possible bug)

Josh Coalson xflac at yahoo.com
Wed Jun 6 12:41:21 PDT 2001


> A minor point. Would it not be better if flac defaulted to .wav input
> rather than raw samples. I think it's going to get wav input an order
> of
> magnitude more than raw samples? It saves always having to put the
> -fw in
> there, on these:
> 
> $ flac -fw - mj.flac < mj.wav
> $ cat mj.wav | flac -fw - mj.flac
> 
> For that matter it should be able to detect wav input and fall back
> to raw
> samples if not detected? The chances of a raw file starting:
> 
> RIFFxxxxWAVEfmt
> 
> Are not worth caring about.

This is an old thread, but I have implemented a crude form of
autodetection that should be sufficient.  Basically, since the
case we really care about is pipe input and ungetc only guarantees
you 4 characters, it just checks for 'RIFF'.  This should be
enough since the usage clearly states that only WAVE files and
raw are supported.

Josh


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/




More information about the Flac-dev mailing list