From owner-freebsd-multimedia@FreeBSD.ORG Wed Oct 31 09:11:23 2012 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EDE509D2 for ; Wed, 31 Oct 2012 09:11:23 +0000 (UTC) (envelope-from normalperson@yhbt.net) Received: from dcvr.yhbt.net (dcvr.yhbt.net [64.71.152.64]) by mx1.freebsd.org (Postfix) with ESMTP id D7E018FC0C for ; Wed, 31 Oct 2012 09:11:23 +0000 (UTC) Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 3E7561F435; Wed, 31 Oct 2012 09:03:50 +0000 (UTC) Date: Wed, 31 Oct 2012 09:03:50 +0000 From: Eric Wong To: sox-devel@lists.sourceforge.net Subject: Re: [SoX-devel] Bug in sox-14.3.2/src/oss.c Message-ID: <20121031090350.GA8165@dcvr.yhbt.net> References: <201210281324.36923.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201210281324.36923.hselasky@c2i.net> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-multimedia@freebsd.org X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Oct 2012 09:11:24 -0000 Hans Petter Selasky wrote: > Hi, > > Line buffering should be off, but this statement leads to SOX reading 1 and > one byte from the recording DSP device under FreeBSD: > > /* Change to non-buffered I/O */ > setvbuf(ft->fp, NULL, _IONBF, sizeof(char) * file->size); > return(SOX_SUCCESS); > > I think this flag should be used instead: > > _IOFBF fully buffered > > I've tested this change and it works like expected. > > Any comments? The code you're changing in src/oss.c no long applies to SoX 14.4.0, how does 14.4.0 work out-of-the-box for you?