Version française
Home     About     Download     Resources     Contact us    
Browse thread
ANNOUNCE : libsndfile-ocaml alpha
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Erik de Castro Lopo <mle+ocaml@m...>
Subject: Re: [Caml-list] ANNOUNCE : libsndfile-ocaml alpha
Richard Jones wrote:

> On Sun, Dec 31, 2006 at 03:23:05PM +1100, Erik de Castro Lopo wrote:
> > 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).

Well the amount of copying is the same whether I use bigarray or a 
standard Ocaml float array so (a) is irrelevant.

Point (b) does make some sense in that someone might want to open a file,
seek to position A, read data from position A to position B, writing the
read data to a new file. An important criteria might well be that the
copied section of data be identical in source and destinations files.
However, using Ocaml float data this would actually be the case.

Erik
-- 
+-----------------------------------------------------------+
  Erik de Castro Lopo
+-----------------------------------------------------------+
"Hamas: Islam will conquer US and Britain."
-- http://www.pmw.org.il/LatestBulletins.htm#b220606