From: <av...@us...> - 2011-07-09 03:49:19
|
Revision: 3639 http://sc2.svn.sourceforge.net/sc2/?rev=3639&view=rev Author: avolkov Date: 2011-07-09 03:49:12 +0000 (Sat, 09 Jul 2011) Log Message: ----------- 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 Modified Paths: -------------- trunk/sc2/src/libs/sound/openal/audiodrv_openal.c trunk/sc2/src/libs/sound/openal/audiodrv_openal.h trunk/sc2/src/libs/sound/sfx.c Modified: trunk/sc2/src/libs/sound/openal/audiodrv_openal.c =================================================================== --- trunk/sc2/src/libs/sound/openal/audiodrv_openal.c 2011-07-09 02:32:58 UTC (rev 3638) +++ trunk/sc2/src/libs/sound/openal/audiodrv_openal.c 2011-07-09 03:49:12 UTC (rev 3639) @@ -193,10 +193,7 @@ return -1; } - if (optStereoSFX) - alDistanceModel (AL_INVERSE_DISTANCE); - else - alDistanceModel (AL_NONE); + alDistanceModel (AL_INVERSE_DISTANCE); (void) driver; // eat compiler warning Modified: trunk/sc2/src/libs/sound/openal/audiodrv_openal.h =================================================================== --- trunk/sc2/src/libs/sound/openal/audiodrv_openal.h 2011-07-09 02:32:58 UTC (rev 3638) +++ trunk/sc2/src/libs/sound/openal/audiodrv_openal.h 2011-07-09 03:49:12 UTC (rev 3639) @@ -22,7 +22,6 @@ #include "config.h" #include "libs/sound/sound.h" -#include "options.h" #include "endian_uqm.h" #if defined (__APPLE__) Modified: trunk/sc2/src/libs/sound/sfx.c =================================================================== --- trunk/sc2/src/libs/sound/sfx.c 2011-07-09 02:32:58 UTC (rev 3638) +++ trunk/sc2/src/libs/sound/sfx.c 2011-07-09 03:49:12 UTC (rev 3639) @@ -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 @@ 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]); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |