Mail Archives: djgpp/1997/03/19/20:58:32
Ben N Shadwick writes:
>Is there a size limit on WAV (digitized sound) files that can be played
>in Allegro? I have this one file that's about 750k that plays fine, but
>this other one that's just over 1meg cuts off after a second or so. I
That is the result of an overflow in the counter I use to store the
voice position. It is a 32 bit unsigned int in fixed point 20.12 format,
which allows sounds up to 1048576 samples in length. How long that is in
human terms depends on the frequency of the sample: at 22050hz it is
just over 45 seconds. To play longer samples you could try reducing the
accuracy of the counter (edit sound,c and reduce the value of
MIXER_FIX_SHIFT). In fact I think I will have a play with that and see
how low I can get it, before starting to lose too much precision...
--
Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
Beauty is a French phonetic corruption of a short cloth neck ornament.
- Raw text -