delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/22/10:38:05

Message-ID: <349E88F0.87699033@no.spam.mcs.nl>
Date: Mon, 22 Dec 1997 16:36:16 +0100
From: "A.P. Zijlstra" <peter AT no DOT spam DOT mcs DOT nl>
Reply-To: peter AT no DOT spam DOT mcs DOT nl
Organization: Physics student @ University of Amsterdam
MIME-Version: 1.0
To: "A. Jans-Beken" <jabe AT oce DOT nl>
CC: djgpp AT delorie DOT com
Subject: Re: Smart stereo sound effects
References: <349AA5AA DOT 5372 AT oce DOT nl>

A. Jans-Beken wrote:
> 
> This may be off-topic - please forgive.
> 
> In a tile-based strategy game I want to add soundeffects (explosions and
> the like - recorded as MONO wav-files) - I am using DJGPP and allegro.
> 
> My problem is that a lot of events happen, some on the visible area of
> the screen, some others not visible.
> In case of an event how can I decide if I must play the according
> soundeffect (depending on the position of the vehicle in relation to the
> visible area)
> How is the volume altered in relation to the distance and position of
> the event.
> Is it possible to include surround soundeffects?
> 
> Can somebody send me some information?
> 
> thanx
The intensity of sound is inversely proportional to the squared distance
to 
the source. Only trouble with this is that most volume controls for the
wide
scala of available sound-cards are not quite linear. You could try using
some
gamma function to compensate...

As for surround effects and such.. you should realy ask this in a sound 
group, as far as I know this is attainable by imposing fase differences
on
the left and right sound channel, this in combination with all kinds of 
filters eg. flanging, hi-pass, etc... will generate some realy neat
sounding
effects...

happy coding,

Peter

- Raw text -


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