Message-ID: <349E88F0.87699033@no.spam.mcs.nl> Date: Mon, 22 Dec 1997 16:36:16 +0100 From: "A.P. Zijlstra" 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" CC: djgpp AT delorie DOT com Subject: Re: Smart stereo sound effects References: <349AA5AA DOT 5372 AT oce DOT nl> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk 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