]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_main.c
changed svbsp code to use floats instead of doubles
[xonotic/darkplaces.git] / snd_main.c
index 9be23f2b30a331562557e743f6109b066ed60b43..40a8c187f60ff330a5dfbdf58277aceef22901eb 100644 (file)
@@ -170,7 +170,7 @@ cvar_t snd_spatialization_control = {CVAR_SAVE, "snd_spatialization_control", "0
 cvar_t snd_spatialization_occlusion = {CVAR_SAVE, "snd_spatialization_occlusion", "1", "enable occlusion testing on spatialized sounds, which simply quiets sounds that are blocked by the world"};
 
 // Cvars declared in snd_main.h (shared with other snd_*.c files)
-cvar_t _snd_mixahead = {CVAR_SAVE, "_snd_mixahead", "0.11", "how much sound to mix ahead of time"};
+cvar_t _snd_mixahead = {CVAR_SAVE, "_snd_mixahead", "0.15", "how much sound to mix ahead of time"};
 cvar_t snd_swapstereo = {CVAR_SAVE, "snd_swapstereo", "0", "swaps left/right speakers for old ISA soundblaster cards"};
 extern cvar_t v_flipped;
 cvar_t snd_channellayout = {0, "snd_channellayout", "0", "channel layout. Can be 0 (auto - snd_restart needed), 1 (standard layout), or 2 (ALSA layout)"};
@@ -1466,7 +1466,8 @@ int S_StartSound (int entnum, int entchannel, sfx_t *sfx, vec3_t origin, float f
                        if (ch->entnum == entnum && (ch->entchannel == entchannel || entchannel == -1) )
                        {
                                S_SetChannelVolume(ch_idx, fvol);
-                               ch->dist_mult = attenuation / (64.0f * snd_soundradius.value);
+                               ch->dist_mult = attenuation / snd_soundradius.value;
+                               SND_Spatialize(ch, false);
                                return ch_idx;
                        }
                }