From owner-freebsd-current@FreeBSD.ORG Sat Jan 24 11:18:59 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 904E716A4CE for ; Sat, 24 Jan 2004 11:18:59 -0800 (PST) Received: from hak.cnd.mcgill.ca (hak.cnd.mcgill.ca [132.216.11.133]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3535743D49 for ; Sat, 24 Jan 2004 11:18:58 -0800 (PST) (envelope-from mat@hak.cnd.mcgill.ca) Received: from hak.cnd.mcgill.ca (localhost [127.0.0.1]) by hak.cnd.mcgill.ca (8.12.9/8.12.8) with ESMTP id i0OJFFpq094155; Sat, 24 Jan 2004 14:15:15 -0500 (EST) (envelope-from mat@hak.cnd.mcgill.ca) Received: (from mat@localhost) by hak.cnd.mcgill.ca (8.12.9/8.12.8/Submit) id i0OJFE6O094154; Sat, 24 Jan 2004 14:15:14 -0500 (EST) Date: Sat, 24 Jan 2004 14:15:14 -0500 From: Mathew Kanner To: Stefan Ehmann Message-ID: <20040124191514.GO64193@cnd.mcgill.ca> References: <1074937301.2959.7.camel@shoeserv.freebsd> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1074937301.2959.7.camel@shoeserv.freebsd> User-Agent: Mutt/1.4.1i Organization: I speak for myself, operating in Montreal, CANADA X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.62 X-Spam-Checker-Version: SpamAssassin 2.62 (2004-01-11) on hak.cnd.mcgill.ca cc: current@freebsd.org Subject: Re: write(2) lc_r problem X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2004 19:18:59 -0000 On Jan 24, Stefan Ehmann wrote: > I'm trying to write a small sound application and run across a problem > on CURRENT. > > It's very basic at the moment. It simply reads pcm data from a file and > uses write(2) on /dev/dsp. > > But as soon as I link the program with -lc_r there's always about 1 > second delay before a write call - which makes it pretty unusable for > playing sound. > > It should be easy reproducable if you link audio/waveplay with -lc_r. > > This doesn't happen in either FreeBSD 4.9, Knoppix or CURRENT if linked > with -lkse or -lthr. > > Am I'm missing something basic when using write together with lc_r or > ist this a bug in CURRENT? There is definetly a bug with the sound code when using vchans and select. Make sure that (using sysctl) hw.snd.maxautovchans=0 hw.snd.pcmX.vchans=0 --Mat -- In general, a standard is very useful, whether it's de facto or du jour. - Microsoft's Greg Sullivan as misquoted by News.Com