On Oct 29, 2013, at 5:24 AM, David Griffith <dgriffi at cs.csubak.edu> wrote:
Does anyone here have an example of C code to play AIFF audio files in 16-bit DOS to a
Soundblaster audio board?
If you can write the code to play WAV files, you should be able to do AIFF as
well; they're two implementations of relatively similar concepts. The most
onerous thing you're going to have to do with an AIFF is swap the bytes
(because they were designed for big-endian machines) and deal with 80-bit
floats (which the x87 ought to deal with just fine, since they are just
IEEE 754 extended floats).
Also, since AIFF is a container format, it can contain a LOT of different
audio formats (including weird compressed ones, like MACE). Hopefully
yours are in PCM.
If you need pre-cooked code, I'm afraid I don't have any. But you could
write something to extract the raw PCM (assuming that's what you have) into
a buffer and feed it to your sound playing routine with relative ease.
There are pretty good links to the file format specifications on Wikipedia's
page on AIFF.
- Dave