// Cvars declared in snd_main.h (shared with other snd_*.c files)
cvar_t _snd_mixahead = {CVAR_SAVE, "_snd_mixahead", "0.15", "how much sound to mix ahead of time"};
+cvar_t snd_streaming = { CVAR_SAVE, "snd_streaming", "1", "enables keeping compressed ogg sound files compressed, decompressing them only as needed, otherwise they will be decompressed completely at load (may use a lot of memory)"};
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)"};
ch_ind = S_StartSound (-1, 0, sfx, listener_origin, fvol, attenuation);
// Free the sfx if the file didn't exist
- if (ch_ind < 0)
+ if (!sfx->fetcher)
S_FreeSfx (sfx, false);
else
channels[ch_ind].flags |= CHANNELFLAG_LOCALSOUND;
Cvar_RegisterVariable(&nosound);
Cvar_RegisterVariable(&snd_precache);
Cvar_RegisterVariable(&snd_initialized);
+ Cvar_RegisterVariable(&snd_streaming);
Cvar_RegisterVariable(&ambient_level);
Cvar_RegisterVariable(&ambient_fade);
Cvar_RegisterVariable(&snd_noextraupdate);
// finally, set the sfx pointer, so the channel becomes valid for playback
// and will be noticed by the mixer
target_chan->sfx = sfx;
- SND_Spatialize (target_chan, isstatic);
}