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 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 12701BC0C for ; Mon, 4 Dec 2006 20:30:34 +0100 (CET) Received: from smtp.syd.people.net.au (smtp.syd.people.net.au [218.214.225.98]) by discorde.inria.fr (8.13.6/8.13.6) with SMTP id kB4JUTVw030220 for ; Mon, 4 Dec 2006 20:30:32 +0100 Received: (qmail 17941 invoked from network); 4 Dec 2006 19:30:22 -0000 Received: from unknown (HELO coltrane.mega-nerd.net) (218.214.64.136) by smtp.syd.people.net.au with SMTP; 4 Dec 2006 19:30:22 -0000 Received: from coltrane (coltrane [192.168.1.101]) by coltrane.mega-nerd.net (Postfix) with SMTP id 38FC97ADA for ; Tue, 5 Dec 2006 06:30:22 +1100 (EST) Date: Tue, 5 Dec 2006 06:30:22 +1100 From: Erik de Castro Lopo To: caml-list@inria.fr Subject: Re: [Caml-list] reading audio Message-Id: <20061205063022.5a652949.mle+ocaml@mega-nerd.com> In-Reply-To: <20061204114243.GA13275@furbychan.cocan.org> References: <4573E826.1080803@ujf-grenoble.fr> <20061204114243.GA13275@furbychan.cocan.org> Organization: Erik Conspiracy Secret Labs X-Mailer: Sylpheed version 2.3.0beta3 (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 discorde with ID 45747755.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; ocaml:01 knuth:01 wrote:01 caml-list:01 writting:01 data:02 parse:02 bytes:03 hack:04 erik:04 erik:04 correctly:05 problem:05 path:07 cases:08 Richard Jones wrote: > The WAV format is pretty simple. Have you tried just mapping the > file? You'll need to ignore the first "data samples" covering the > first 44 bytes of the file (the header). > > http://ccrma.stanford.edu/courses/422/projects/WaveFormat/ Yes, the most common WAV files are easy to parse but there are a gazzillion extensions and corner cases to take care of. So *please* don't lead people down that path, bcause next thing they will be writting WAV files as well and they will make a mistake and not follow the spec (so called) correctly and their software will become popular and I (as the author of libsndfile) will have to add yet another hack to work around someone else's broken WAV file (libsndfile is already full of these). I'm busy ATM, but give me a couple of weeks and I will make an ocaml-libsndfile. Erik -- +-----------------------------------------------------------+ Erik de Castro Lopo +-----------------------------------------------------------+ "Whenever the C++ language designers had two competing ideas as to how they should solve some problem, they said, "OK, we'll do them both". So the language is too baroque for my taste." -- Donald E Knuth