NetBSD Problem Report #8390
Received: (qmail 5216 invoked from network); 13 Sep 1999 01:43:29 -0000
Message-Id: <199909130141.VAA00683@ursula.wongs.net>
Date: Sun, 12 Sep 1999 21:41:17 -0400 (EDT)
From: hackerb9@u.washington.edu
Reply-To: hackerb9@u.washington.edu
To: gnats-bugs@gnats.netbsd.org
Subject: -f and -P are broken in audiplay
X-Send-Pr-Version: 3.95
>Number: 8390
>Category: bin
>Synopsis: Audioplay's -f and -P options don't work as advertised.
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: mrg
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Sep 12 18:50:00 +0000 1999
>Closed-Date: Mon Sep 13 17:18:48 +0000 1999
>Last-Modified: Sun Dec 17 13:25:54 +0000 2000
>Originator: Ben Wong
>Release: NetBSD 1.4.1
>Organization:
University of Washington
>Environment:
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 root@ursula.wongs.net:/usr/src/sys/arch/i386/compile/AMNESIAC i386
>Description:
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().
>How-To-Repeat:
% 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].
>Fix:
Change Line 347 of play.c from:
return (hdr_len);
to
return 0; /* Forced play: don't skip over header */
and then
Change line 340 of play.c from:
info.play.encoding = precision;
to
info.play.precision = precision;
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: bin-bug-people->mrg
Responsible-Changed-By: ross
Responsible-Changed-When: Sun Sep 12 20:26:45 PDT 1999
Responsible-Changed-Why:
State-Changed-From-To: open->closed
State-Changed-By: tron
State-Changed-When: Mon Sep 13 10:18:48 PDT 1999
State-Changed-Why:
Fixes committed, thanks.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.