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.
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.
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!
@jap
Or you can use libaiff, which is very lightweight:
Link to os4depot.net
AmigaOne X5000-020 / 2GB RAM / Sapphire Pulse Radeon RX 560 / AmigaOS 4.1 Final Edition Update 2
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.