From owner-freebsd-questions@FreeBSD.ORG Thu Dec 31 20:34:21 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40DE2106568B for ; Thu, 31 Dec 2009 20:34:21 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from mail3.sea5.speakeasy.net (mail3.sea5.speakeasy.net [69.17.117.5]) by mx1.freebsd.org (Postfix) with ESMTP id 188628FC0C for ; Thu, 31 Dec 2009 20:34:20 +0000 (UTC) Received: (qmail 23032 invoked from network); 31 Dec 2009 20:34:20 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail3.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 31 Dec 2009 20:34:20 -0000 Received: from lowell-desk.lan (lowell-desk.lan [172.30.250.6]) by be-well.ilk.org (Postfix) with ESMTP id D668F50822 for ; Thu, 31 Dec 2009 15:34:12 -0500 (EST) Received: by lowell-desk.lan (Postfix, from userid 1147) id 1E0E61CC5D; Thu, 31 Dec 2009 15:34:11 -0500 (EST) From: Lowell Gilbert To: freebsd-questions@freebsd.org References: <20091231093637.GA1832@thought.org> <447hs3kmco.fsf@be-well.ilk.org> <20091231201117.GB3733@thought.org> Date: Thu, 31 Dec 2009 15:34:11 -0500 In-Reply-To: <20091231201117.GB3733@thought.org> (Gary Kline's message of "Thu, 31 Dec 2009 12:11:17 -0800") Message-ID: <44ws023mt8.fsf@lowell-desk.lan> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: is there a way to convert an audio file into a char array? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2009 20:34:21 -0000 Gary Kline writes: > Yeah, I views the file with od -c; but wouldn't it be much faster > to have the data file part of my test program than having to open, > read, cat thru /dev/dsp each time, close file? I stole the cat > from the K&R book, and by reading the click.h data file it seems > everything would go much faster. Faster, yes, by multiple microseconds. Save your time, not the computer's. -- Lowell Gilbert, embedded/networking software engineer, Boston area http://be-well.ilk.org/~lowell/