[SDL_sound] AIFF decoder (fwd)

Ryan C. Gordon icculus at clutteredmind.org
Thu Sep 20 04:17:33 EDT 2001

---------- Forwarded message ----------
Date: Thu, 20 Sep 2001 08:29:46 +0200
From: "[iso-8859-1] Torbjörn Andersson"
To: "icculus at clutteredmind.org" <icculus at clutteredmind.org>
Subject: [SDL_sound] AIFF decoder


The AIFF decoder seems to be working now, at least for the files that
I've thrown at it. It wasn't until now that I realized how similar
AIFF is to WAV, so I rewrote it to be much more like your WAV decoder.
There are some subtle differences in find_chunk() and how it's used

I've tried following your coding style as closely as I could, but feel
free to fix it up further.

I've also made a small patch to the WAV loader which I'm sure you will
agree with me when I say it's extremely important and should be given
the highest priority. ;-)

One thing confuses me:

My pet project is a long story. Suffice it to say that I'm trying to
add sound support to the Unix version of someone else's cross-platform
library. All sounds will be bundled together in one big resource file,
along with pictures and other stuff. There's a function to return the
one internal FILE pointer and position it at the start of a specified

This means, correct me if I'm wrong, that I will get a number of RWops
which all share the same FILE pointer. The sound decoders seem to just
assume that internal->rw is still positioned where they left it at the
end of the last call to the decoder.

As far as I can see, SDL_sound.c makes no attempt to remember the
position so SDL_sound.patch, apart from integrating the AIFF decoder,
contains some rather untested code to do so. As I said I'm not
completely sure if it's needed, but...


Torbjörn Andersson

-------------- next part --------------
A non-text attachment was scrubbed...
Name: SDL_sound_wav.patch.gz
Type: application/x-gzip
Size: 261 bytes
URL: <http://icculus.org/pipermail/sdlsound/attachments/20010920/0b5069f0/attachment.gz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SDL_sound.patch.gz
Type: application/x-gzip
Size: 1045 bytes
URL: <http://icculus.org/pipermail/sdlsound/attachments/20010920/0b5069f0/attachment-0001.gz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aiff.c.gz
Type: application/x-gzip
Size: 4112 bytes
URL: <http://icculus.org/pipermail/sdlsound/attachments/20010920/0b5069f0/attachment-0002.gz>

More information about the sdlsound mailing list