Browse thread
ANNOUNCE : libsndfile-ocaml alpha
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2006-12-31 (11:08) |
From: | Richard Jones <rich@a...> |
Subject: | Re: [Caml-list] ANNOUNCE : libsndfile-ocaml alpha |
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!