Subject: Re: Re: bin/30612
To: , , <>
From: None <>
List: netbsd-bugs
Date: 07/10/2005 20:06:57
> in addition to the info.record values not being set, the default encoding
> was ulaw which is not always supported.  now the default encoding is as
> the audio device currently has.
> this is fixed in record.c 1.40; can you confirm it works for you?

First let me thank you for the quick fix. It works now but I am not fully satisfied: audiorecord sets the output format (-F) according to the extension if it is .wav or .au. This is a useful feature. The audiorecord manpage states for the -e option:

If the output format is "sun", the file will contain slinear_be samples, if it is "wav", then slinear_le, independent of the argument to -e.

I understood that so that I can avoid the -e option if I specify a .wav file:
audiorecord -c 2 -P 16 -p line -s 44100 foo.wav

This does not work because audiorecord only sets the format but not the encoding when encountering a .wav extension. I must explicitly set the encoding:
audiorecord -c 2 -e slinear_le -P 16 -p line -s 44100 foo.wav

This seems to be what the manpage hints at with the sentence:
Setting the argument to -e still may be important since it is used in an ioctl(2) call to the kernel to choose the kind of data provided.

I think this causes unnecessary confusion (at least it did for me). audiorecord should simply set both the format and the encoding according to the file extension if not explicitly overridden by a command line option.

Martin "Jerry" Jerabek

Martin "Jerry" Jerabek