www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/29/11:32:17

From: "Scott J. Tringali" <tringali AT res DOT nospam DOT ray DOT com>
Newsgroups: rec.games.programmer,comp.ai.games,comp.os.msdos.djgpp,rec.games.programmer
Subject: Re: Smart stereo sound effects
Date: Mon, 29 Dec 1997 10:48:18 -0500
Organization: Raytheon Electronic Systems
Lines: 23
Message-ID: <34A7C642.FBAC41AE@res.nospam.ray.com>
References: <349AA5AA DOT 5372 AT oce DOT nl> <01bd100b$a40c5c00$9a1e1eac AT nickv DOT synergistic-sw DOT com>
Reply-To: tringali AT ultranet DOT nospam DOT com
NNTP-Posting-Host: dh5144139.res.ray.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

DirectSound is the easiest way to go.  All you have to do is sample your
effect in mono.  Then, you tell DirectSound what the x, y, and z is of the
sound.  Then, just play it.  It does all the rolloff, muffling, and stereo
mixing for you.

For more advanced effects, you can have your engine set velocity vectors to
get Doppler shifts.  You can also exaggerate/minimize the Doppler/rolloff
effects as wanted.

As for surround: since 3-D positional audio is typically realized only on
stereo speakers, the Z is emulated via muffling and other minor effects (such
as shape-of-ear distortion).  I'm not familiar with any sound cards that
actually have a surround output, but once they come out, it looks like
DirectSound will support it.

--
Scott J. Tringali, Software Engineer                            #include
</dev/tty>
International Air Traffic Control, Raytheon Electronic Systems
If you want to email me, please do the obvious.  If it isn't obvious, don't
bother.


- Raw text -


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