[H-GEN] needed: a function for reading wave files
Stephen Brine
sbrine at powerup.com.au
Tue Aug 19 10:45:35 EDT 2003
[ Humbug *General* list - semi-serious discussions about Humbug and ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]
Hi all, I have a uni project where I need to, amongst a few other things,
read a wave file into a C program then process it and spit it back out to a
different wave file.
Now being much of a NON pc programmer I am not too sure on how to do it. I
am using GCC. I guess what i want is a lump of prewritten code that more or
less is a function that I can feed the filename to and then extract all the
relevant data from and poke this into an array or vector, probably a
vector. Processing it is ok then I need to spit it back to a wave. I hope
this makes sense. I have looked on the net and have found stuff, BUT my
level of C coding is rather limited when it comes to pc's (I write C code
for embedded systems and microcontrollers)
Example of what I think I want
double wavread(filename)
void wavwrite(filename, data)
or much like MATLAB (I have written and simulated all these in matlab and
it is working)
I have just been going through the source for SOX (/usr/bin/sox) and it may
be of help if I can understand it. That can be a task for later today.
Steve B
Blessed are the pessimists, for they make backups.
--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'. See http://www.humbug.org.au/
More information about the General
mailing list