From: sime AT fly DOT cc DOT fer DOT hr (Simun Mikecin) Newsgroups: comp.os.msdos.djgpp Subject: Re: Allegro & WAV files Date: 22 Mar 1997 13:02:37 GMT Organization: etf Lines: 23 Distribution: world Message-ID: <5h0l9d$kjk@bagan.srce.hr> References: <19970318 DOT 231802 DOT 18302 DOT 1 DOT bshadwick AT juno DOT com> Reply-To: sime AT fly DOT cc DOT etf DOT hr NNTP-Posting-Host: fly.cc.etf.hr Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp 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? -- <2nd E-mail: simun DOT mikecin AT fer DOT hr >