Subject: bin/8390: -f and -P are broken in audiplay
To: None <email@example.com>
From: None <firstname.lastname@example.org>
Date: 09/12/1999 19:02:47
>Synopsis: Audioplay's -f and -e options don't work as advertised.
>Responsible: bin-bug-people (Utility Bug People)
>Arrival-Date: Sun Sep 12 18:50:00 1999
>Originator: Ben Wong
University of Washington
>Release: NetBSD 1.4.1
i386, NetBSD 1.4.1
System: NetBSD ursula.wongs.net 1.4.1 NetBSD 1.4.1 (AMNESIAC) #6: Sun Sep 12 20:44:36 EDT 1999 email@example.com:/usr/src/sys/arch/i386/compile/AMNESIAC i386
audioplay -f is supposed to force audioplay to play a file even if it
doesn't recognize the format. This is broken since
play.c:audioctl_write_fromhdr() returns hdr_len instead of zero. This
causes -f to be ignored and the program quits complaining that the
header is unrecognized.
audioplay -P precision is supposed to set the number of bits per
sample. Unfortunately, there is a typo in the code such that instead of
setting info.play.precision it sets info.play.encoding. This makes -P
completely useless. This bug is also in audioctl_write_fromhdr().
% audioplay -f /dev/zero
[Should play silence, instead exits with an error].
% audioplay -P 16 file.wav
[Should set precision to 16 but instead exits with an error].
Change Line 347 of play.c from:
return 0; /* Forced play: don't skip over header */
Change line 340 of play.c from:
info.play.encoding = precision;
info.play.precision = precision;