[Klug-general] Wav Files

James Morris jwm.art.net at gmail.com
Fri Dec 16 14:54:27 UTC 2011


On 16 December 2011 10:14, Peter Childs <pchilds at bcs.org> wrote:
> I'm trying to play a wav file under Linux....
>
> Its
>
> $> file default.wav
> default.wav: RIFF (little-endian) data, WAVE audio, mono 8000 Hz
>
> but nothing will play it, sox just says
>
> $> sox default.wav  new.wav
> sox FAIL formats: can't open input file `default.wav': Unknown WAV
> file encoding (type 86)
>
> any ideas?

sndfile-info *might* be more knowledgeable regarding the format - if
it is a real format - where other commands may have failed.
sndfile-info will probably be installed on your system as it's part of
libsndfile. though having said that, most popular audio software uses
libsndfile anyway, but it's worth seeing what it says.

may also be worth issuing the sox command to show information:

sox foo.wav -e stat

(the -e prevents sox from playing the file (or trying to) ).

you could also try force-feeding the format to sox:

play -r 8000 -e signed -b 8 -c 1 yourdodgyaudio.wav

depending on if the data is (probably) signed or not, the bit format
8, 16, etc and number of channels. you've heard it on windows so
experiment (with signed, bit format, and channels) until you get the
sound right.

the drawback is that you're also playing the (possibly corrupted) WAV
header (the basic WAV header is around 44 bytes).

a long time ago I used to mess around with wav file headers i was
attempting to write in qbasic, using microsoft debug. i've never
figured out (or needed to) the linux equivalent of microsoft debug,
other than hexdump.

James.





>
> I know the file is ok I've heard it under windows.....
>
> Peter.
>
> _______________________________________________
> Kent mailing list
> Kent at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/kent



More information about the Kent mailing list