Mail Archives: djgpp/1997/03/22/11:20:47
Shawn Hargreaves (Shawn AT talula DOT demon DOT co DOT uk) wrote:
: 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...
Couldn't you use 64-bit unsigned int (unsigned long long), and have both the
accuracy and length?
--
<E-mail: sime AT fly DOT cc DOT fer DOT hr >
<2nd E-mail: simun DOT mikecin AT fer DOT hr >
<URL: http://fly.cc.fer.hr/~sime>
- Raw text -