delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/19/20:58:32

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Allegro & WAV files
Date: Wed, 19 Mar 1997 19:59:22 +0000
Organization: None
Distribution: world
Message-ID: <L6nhZGAaWEMzEwXy@talula.demon.co.uk>
References: <19970318 DOT 231802 DOT 18302 DOT 1 DOT bshadwick AT juno DOT com>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
Lines: 18
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019