delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/22/11:20:47

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> <L6nhZGAaWEMzEwXy AT talula DOT demon DOT co DOT uk>
Reply-To: sime AT fly DOT cc DOT etf DOT hr
NNTP-Posting-Host: fly.cc.etf.hr
Mime-Version: 1.0
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?

--

                                          <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 -


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