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;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (optStereoSFX)
|
alDistanceModel (AL_INVERSE_DISTANCE);
|
||||||
alDistanceModel (AL_INVERSE_DISTANCE);
|
|
||||||
else
|
|
||||||
alDistanceModel (AL_NONE);
|
|
||||||
|
|
||||||
(void) driver; // eat compiler warning
|
(void) driver; // eat compiler warning
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,6 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "libs/sound/sound.h"
|
#include "libs/sound/sound.h"
|
||||||
#include "options.h"
|
|
||||||
#include "endian_uqm.h"
|
#include "endian_uqm.h"
|
||||||
|
|
||||||
#if defined (__APPLE__)
|
#if defined (__APPLE__)
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
static void CheckFinishedChannels (void);
|
static void CheckFinishedChannels (void);
|
||||||
|
|
||||||
|
static const SoundPosition notPositional = {FALSE};
|
||||||
|
|
||||||
void
|
void
|
||||||
PlayChannel (COUNT channel, SOUND snd, SoundPosition pos,
|
PlayChannel (COUNT channel, SOUND snd, SoundPosition pos,
|
||||||
@@ -50,8 +51,7 @@ PlayChannel (COUNT channel, SOUND snd, SoundPosition pos,
|
|||||||
soundSource[channel].sample = sample;
|
soundSource[channel].sample = sample;
|
||||||
soundSource[channel].positional_object = positional_object;
|
soundSource[channel].positional_object = positional_object;
|
||||||
|
|
||||||
if (optStereoSFX)
|
UpdateSoundPosition (channel, optStereoSFX ? pos : notPositional);
|
||||||
UpdateSoundPosition (channel, pos);
|
|
||||||
|
|
||||||
audio_Sourcei (soundSource[channel].handle, audio_BUFFER,
|
audio_Sourcei (soundSource[channel].handle, audio_BUFFER,
|
||||||
sample->buffer[0]);
|
sample->buffer[0]);
|
||||||
|
|||||||
Reference in New Issue
Block a user