Newsgroups: rec.arts.int-fiction
Path: news.duke.edu!newsgate.duke.edu!news-hog.berkeley.edu!ucberkeley!logbridge.uoregon.edu!feed2.news.rcn.net!rcn!nntp.abs.net!uunet!dca.uu.net!ash.uu.net!world!not-for-mail
From: buzzard@TheWorld.com (Sean T Barrett)
Subject: Re: [Glulx] Problem with WinGlulxe and sound
Sender: news@world.std.com (Mr Usenet Himself)
Message-ID: <GxrHo3.Iu5@world.std.com>
Date: Sat, 15 Jun 2002 19:19:14 GMT
References: <b5b859fd.0206121603.70444ed4@posting.google.com> <nBVN8.5919$Vr2.1431336@news20.bellglobal.com> <GxMs2A.3H1@world.std.com> <aef1n6$27h$1@helle.btinternet.com>
Nntp-Posting-Host: shell01.theworld.com
Organization: The World Public Access UNIX, Brookline, MA
X-Newsreader: trn 4.0-test72 (19 April 1999)
Lines: 21
Xref: news.duke.edu rec.arts.int-fiction:105090

David Kinder <d.kinder@btinternetspamnothankyou.com> wrote:
>There's no WaveOut support as the WaveOut routines don't (as far as
>I can see) provide support for playing multiple sounds at once -
>you'd have to write your own sound mixer. Yuk :-(

   for (i=0; i < sounds_playing; ++i) {
      for (j=0; j < buffer_length; ++j)
         buffer[j] += sound[i].data[j + sound[i].offset];
      sound[i].offset += buffer_length;
   }

modulo handling sounds beginning and ending, and clamping
the sound buffer to 16-bit afterwards, which will grow the
code to, oh, 20 lines or so.

I repeat my claim that requiring DirectX merely for sound
support is overkill. It would be like requiring players to
download winamp for mod support instead of including it in
the terp.

SeanB
