Make the switch from positional -> not positional sfx actually work w/o having sfx channels permanently stuck somewhere in 3D world; there is no reason to use different distance models, and that eliminates the need to change models when switching positional <-> not
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3639 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -193,10 +193,7 @@ openAL_Init (audio_Driver *driver, sint32 flags)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (optStereoSFX)
|
||||
alDistanceModel (AL_INVERSE_DISTANCE);
|
||||
else
|
||||
alDistanceModel (AL_NONE);
|
||||
alDistanceModel (AL_INVERSE_DISTANCE);
|
||||
|
||||
(void) driver; // eat compiler warning
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
|
||||
#include "config.h"
|
||||
#include "libs/sound/sound.h"
|
||||
#include "options.h"
|
||||
#include "endian_uqm.h"
|
||||
|
||||
#if defined (__APPLE__)
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
static void CheckFinishedChannels (void);
|
||||
|
||||
static const SoundPosition notPositional = {FALSE};
|
||||
|
||||
void
|
||||
PlayChannel (COUNT channel, SOUND snd, SoundPosition pos,
|
||||
@@ -50,8 +51,7 @@ PlayChannel (COUNT channel, SOUND snd, SoundPosition pos,
|
||||
soundSource[channel].sample = sample;
|
||||
soundSource[channel].positional_object = positional_object;
|
||||
|
||||
if (optStereoSFX)
|
||||
UpdateSoundPosition (channel, pos);
|
||||
UpdateSoundPosition (channel, optStereoSFX ? pos : notPositional);
|
||||
|
||||
audio_Sourcei (soundSource[channel].handle, audio_BUFFER,
|
||||
sample->buffer[0]);
|
||||
|
||||
Reference in New Issue
Block a user