Browse thread
ANNOUNCE : libsndfile-ocaml alpha
-
Erik de Castro Lopo
-
Vu Ngoc San
-
Erik de Castro Lopo
- Erik de Castro Lopo
- Erik de Castro Lopo
-
Erik de Castro Lopo
-
Vu Ngoc San
[
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: | -- (:) |
| From: | Erik de Castro Lopo <mle+ocaml@m...> |
| Subject: | Re: [Caml-list] ANNOUNCE : libsndfile-ocaml alpha |
Erik de Castro Lopo wrote: > Vu Ngoc San wrote: > > > haven't had the time to really test it, but it seems to work nicely. > > Wouldn't it be interesting to optionally create a bigarray instead of an > > array ? > > Wow, I've just looked up the Ocaml bigarray module. I didn't even > know it existed. I'll take a look at it. It may be a better solution > than what I have now. After a more detailed look at this I don't see any advantage to using the bigarray module. The C API for libsndfile allows reading data as short, int, float or double. During reads, libsndfile automatically converts from the internal data format of the file to the data format requested by the user. The trouble interfacing with Ocaml is that Ocaml doesn't support 16 bit shorts, 32 bit ints or 32 bit floats. The only data type that makes any sense is the Ocaml float type (C double). So, I'd like to ask, if I provide a bigarray interface, how would it be used? Erik -- +-----------------------------------------------------------+ Erik de Castro Lopo +-----------------------------------------------------------+ "There are two kinds of large software systems: those that evolved from small systems and those that don't work." -- Seen on slashdot.org, then quoted by amk