From: skaller <skaller@users.sourceforge.net>
To: Erik de Castro Lopo <mle+ocaml@mega-nerd.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] ANNOUNCE : libsndfile-ocaml alpha
Date: Mon, 01 Jan 2007 06:05:14 +1100 [thread overview]
Message-ID: <1167591914.5340.1.camel@rosella.wigram> (raw)
In-Reply-To: <20061231152305.694fd3e9.mle+ocaml@mega-nerd.com>
On Sun, 2006-12-31 at 15:23 +1100, Erik de Castro Lopo wrote:
> 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.
I don't claim it is .. just answering your question, which
was about how to use an array of, for example, shorts.
> 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?
Performance or space issues?
--
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net
next prev parent reply other threads:[~2006-12-31 19:05 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-22 4:54 Erik de Castro Lopo
2006-12-27 9:32 ` [Caml-list] " Vu Ngoc San
2006-12-27 10:10 ` Erik de Castro Lopo
2006-12-27 10:42 ` Erik de Castro Lopo
2006-12-30 21:07 ` Erik de Castro Lopo
2006-12-31 3:31 ` skaller
2006-12-31 4:23 ` Erik de Castro Lopo
2006-12-31 11:08 ` Richard Jones
2006-12-31 22:51 ` Erik de Castro Lopo
2007-01-01 14:53 ` Matthieu Dubuget
2007-01-01 19:58 ` Erik de Castro Lopo
2007-01-02 0:51 ` skaller
2007-01-02 1:14 ` Erik de Castro Lopo
2007-01-02 5:26 ` Erick Tryzelaar
2007-01-02 5:39 ` Erik de Castro Lopo
[not found] ` <1167765505.5341.12.camel@rosella.wigram>
2007-01-02 22:37 ` Erik de Castro Lopo
2007-01-02 23:46 ` Gerd Stolpmann
2007-01-03 1:59 ` Pal-Kristian Engstad
2007-01-03 2:49 ` Markus Mottl
2007-01-02 7:47 ` Christoph Bauer
2006-12-31 19:05 ` skaller [this message]
2006-12-31 22:54 ` Erik de Castro Lopo
2007-01-02 10:56 ` Vu Ngoc San
2007-01-02 11:27 ` Erik de Castro Lopo
2007-01-02 19:39 ` David Baelde
2007-01-02 23:04 ` Erik de Castro Lopo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1167591914.5340.1.camel@rosella.wigram \
--to=skaller@users.sourceforge.net \
--cc=caml-list@yquem.inria.fr \
--cc=mle+ocaml@mega-nerd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox