How to create an AIFF file?

5 posts / 0 new
Last post
jap
jap's picture
Offline
Last seen: 9 months 2 weeks ago
Joined: 2011-06-04 05:53
How to create an AIFF file?

Hi,

What would be the easiest way to create an AIFF file? Can the iffparse.library functions be used for that?

thomas
thomas's picture
Offline
Last seen: 3 months 6 days ago
Joined: 2011-05-16 14:23
Re: How to create an AIFF file?

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.

jap
jap's picture
Offline
Last seen: 9 months 2 weeks ago
Joined: 2011-06-04 05:53
Re: How to create an AIFF file?

OK, thanks thomas!

trixie
trixie's picture
Offline
Last seen: 6 months 3 weeks ago
Joined: 2011-02-03 13:58
Re: How to create an AIFF file?

@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

hypex
hypex's picture
Offline
Last seen: 3 months 2 weeks ago
Joined: 2011-09-09 16:20
Re: How to create an AIFF file?

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.

Log in or register to post comments