From owner-freebsd-bugs Wed May 1 18: 0:22 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 57AAE37B41F for ; Wed, 1 May 2002 18:00:08 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g42108536508; Wed, 1 May 2002 18:00:08 -0700 (PDT) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 63B4737B416 for ; Wed, 1 May 2002 17:53:17 -0700 (PDT) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g420rHN35648; Wed, 1 May 2002 17:53:17 -0700 (PDT) (envelope-from nobody) Message-Id: <200205020053.g420rHN35648@freefall.freebsd.org> Date: Wed, 1 May 2002 17:53:17 -0700 (PDT) From: Alan Larson To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: kern/37657: /dev/dsp and /dev/audio skip the first 3200 - 3600 samples Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 37657 >Category: kern >Synopsis: /dev/dsp and /dev/audio skip the first 3200 - 3600 samples >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed May 01 18:00:08 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Alan Larson >Release: 4.3 >Organization: PAIX.net >Environment: FreeBSD alan.paix.net 4.3-RELEASE FreeBSD 4.3-RELEASE #0: Sat Apr 21 10:54:49 GMT 2001 jkh@narf.osd.bsdi.com:/usr/src/sys/compile/GENERIC i386 >Description: The first 3200 - 3600 samples (bytes) of output to /dev/audio or /dev/dsp after open() are ignored. It appears that the exact number may be a function of the number of bytes that had been written by previous users of the device -- possibly the remainder of bytes in a buffer. kern/31445 reports a similar problem in 4.4, but unlike him, I see it in 4.3 as well. His problem was that small sounds never output -- which could be a special case of this one -- that the first 3200 samples (or so) are skipped. Padding buffers out further doesn't help, as the first part of the sound is still lost. >How-To-Repeat: I wrote a little c program to send silence for a while, then a generated sine wave, then about 2 seconds silence, another short sine beep, and pad out to desired size with silence. My beeps were 400 samples long. If the first silent part was <= 3200 samples long, the first beep would not be heard. Often it needed to be 3600 or longer to hear the first beep -- the actual amount varies as mentioend above, and is hard to determine, since one may be hearing only part of the first beep. >Fix: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message