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=none autolearn=disabled version=3.1.3 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 6970CBC0B for ; Sun, 31 Dec 2006 05:23:15 +0100 (CET) Received: from smtp.syd.people.net.au (smtp.syd.people.net.au [218.214.225.98]) by concorde.inria.fr (8.13.6/8.13.6) with SMTP id kBV4NCgk022399 for ; Sun, 31 Dec 2006 05:23:14 +0100 Received: (qmail 2418 invoked from network); 31 Dec 2006 04:23:20 -0000 Received: from unknown (HELO coltrane.mega-nerd.net) (218.214.64.136) by smtp.syd.people.net.au with SMTP; 31 Dec 2006 04:23:20 -0000 Received: from coltrane (coltrane [192.168.1.101]) by coltrane.mega-nerd.net (Postfix) with SMTP id 706207B9A for ; Sun, 31 Dec 2006 15:23:05 +1100 (EST) Date: Sun, 31 Dec 2006 15:23:05 +1100 From: Erik de Castro Lopo To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] ANNOUNCE : libsndfile-ocaml alpha Message-Id: <20061231152305.694fd3e9.mle+ocaml@mega-nerd.com> In-Reply-To: <1167535885.27287.66.camel@rosella.wigram> 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> Organization: Erik Conspiracy Secret Labs X-Mailer: Sylpheed version 2.3.0beta5 (GTK+ 2.8.20; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 45973B30.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 elt:01 ocaml:01 val:01 val:01 1.0:98 wrote:01 caml-list:01 int:01 int:01 data:02 caml:02 caml:02 floats:02 floats:02 skaller wrote: > type ('a, 'b) kind > To each element kind is associated a Caml type, which is the type of > Caml values that can be stored in the big array or read back from it. > This type is not necessarily the same as the type of the array elements > proper: for instance, a big array whose elements are of kind float32_elt > contains 32-bit single precision floats, but reading or writing one of > its elements from Caml uses the Caml type float, which is 64-bit double > precision floats. 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? Erik -- +-----------------------------------------------------------+ Erik de Castro Lopo +-----------------------------------------------------------+ "Do I do everything in C++ and teach a course in advanced swearing?" -- David Beazley at IPC8, on choosing a language for teaching