From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 57E13BC0A for ; Sun, 31 Dec 2006 12:08:39 +0100 (CET) Received: from furbychan.cocan.org (furbychan.cocan.org [80.68.91.176]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id kBVB8cAD031833 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Sun, 31 Dec 2006 12:08:39 +0100 Received: from rich by furbychan.cocan.org with local (Exim 3.35 #1 (Debian)) id 1H0yYJ-0005p8-00; Sun, 31 Dec 2006 11:08:31 +0000 Date: Sun, 31 Dec 2006 11:08:31 +0000 To: Erik de Castro Lopo Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] ANNOUNCE : libsndfile-ocaml alpha Message-ID: <20061231110831.GA21198@furbychan.cocan.org> References: <20061222155407.ebe6c272.mle+ocaml@mega-nerd.com> <45923DC2.9000504@ujf-grenoble.fr> <20061227211046.656615d0.mle+ocaml@mega-nerd.com> <20061231080756.66e89d6c.mle+ocaml@mega-nerd.com> <1167535885.27287.66.camel@rosella.wigram> <20061231152305.694fd3e9.mle+ocaml@mega-nerd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061231152305.694fd3e9.mle+ocaml@mega-nerd.com> User-Agent: Mutt/1.5.9i From: Richard Jones X-Miltered: at discorde with ID 45979A36.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 val:01 val:01 ocaml:01 1.0:98 blog:98 blog:98 wrote:01 caml-list:01 int:01 int:01 data:02 floats:02 floats:02 float:03 On Sun, Dec 31, 2006 at 03:23:05PM +1100, Erik de Castro Lopo wrote: > But why is taht any better than the existing Sndfile read method > which already returns an array of Ocmal floats. See: > > http://www.mega-nerd.com/libsndfile/Ocaml/Sndfile.html > > which has: > > val sf_read : sndfile_t -> float array -> int > val sf_write : sndfile_t -> float array -> int > > (well actually sndfile_t has been changed to Sndfile.t). > > Since it is already possible to read Ocaml floats (which are normalised > to the range [-1.0, 1.0]) why would anyone want to ready any other data > type? Two reasons I can think of[*]: (a) to avoid copying, (b) to make an exact reproduction (without the conversion to and from float). Rich. [*] I haven't looked at the libsndfile code so I've no idea if they're correct, but hey it's Sunday... -- Richard Jones, CTO Merjis Ltd. Merjis - web marketing and technology - http://merjis.com Internet Marketing and AdWords courses - http://merjis.com/courses - NEW! Merjis blog - http://blog.merjis.com - NEW!