Newbie : file handling

From: Martin Raspaud (martin.raspaud_at_wanadoo.fr)
Date: 11/29/03


Date: Sat, 29 Nov 2003 09:39:09 +0100

Hi,

I'm just starting to write a lisp program for music and I want to open a
wav file and read its content and put it into an array.

Opening the file isn't much of a problem. The reading is more.
The 4 first bytes of the file contain "RIFF"
The next 4 bytes contain a 32bits integer giving the length of the file
the next 4 bytes contain "WAVE"
and so on.
My question is : how do I get the length of the file with lisp ? I tried
"read-byte" with several type specifiers, but I can't get anything...
each time I get 4 numbers corresponding to the 4 bytes, but I want 1 number.

I hope anyone has an answer...

Ps : I don't want to use a C program to do that.

Martin


Quantcast