What would be the easiest way to create an AIFF file? Can the iffparse.library functions be used for that?
You could probably use iffparse.library, but you were asking for an easy way.
IMHO the easiest way is to prepare the entire file header, including the FORM and COMM chunks as well as the SSND marker and length as a structure. Then you can fill in the values, write it to the file and then write the audio data and you are done.
If you want to read an IFF file rather than write it, you have to expect the chunks to arrive in different order and with unknown chunks in between. In this case iffparse.library probably is of good help because it can filter the chunks you need.
OK, thanks thomas!
Or you can use libaiff, which is very lightweight:
Link to os4depot.net
I wrote some code to save an AIFF. But when I checked I loaded in an AIFF file then modified the header before saving it out. Creating it from fresh is more work then.