com_soundMegs now defaults to 16

This commit is contained in:
myT 2020-10-15 04:48:41 +02:00
parent ad2d3386a6
commit a4397252c3
2 changed files with 9 additions and 4 deletions

View File

@ -7,6 +7,8 @@ DD Mmm 20 - 1.53
add: r_alphaToCoverageMipBoost <0.0 to 0.5> (default: 0.125) boosts the alpha value of higher mip levels add: r_alphaToCoverageMipBoost <0.0 to 0.5> (default: 0.125) boosts the alpha value of higher mip levels
with A2C enabled, it prevents alpha-tested surfaces from fading (too much) in the distance with A2C enabled, it prevents alpha-tested surfaces from fading (too much) in the distance
chg: com_soundMegs now defaults to 16
chg: all rendering backends use depth clipping, near clip plane distance is 1 instead of 4 chg: all rendering backends use depth clipping, near clip plane distance is 1 instead of 4
chg: cl_aviFrameRate now defaults to 60 chg: cl_aviFrameRate now defaults to 60

View File

@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "snd_codec.h" #include "snd_codec.h"
#define DEF_COMSOUNDMEGS "8" #define DEF_COMSOUNDMEGS "16"
static sndBuffer* sndbuffers = NULL; static sndBuffer* sndbuffers = NULL;
static sndBuffer* freelist = NULL; static sndBuffer* freelist = NULL;
@ -39,6 +39,7 @@ void SND_free( sndBuffer* v )
sndmem_avail += sizeof(sndBuffer); sndmem_avail += sizeof(sndBuffer);
} }
sndBuffer* SND_malloc() sndBuffer* SND_malloc()
{ {
while (!freelist) { while (!freelist) {
@ -59,11 +60,13 @@ void SND_setup()
{ {
sndBuffer *p, *q; sndBuffer *p, *q;
// a sndBuffer is actually 2K+, so this isn't even REMOTELY close to actual megs // a sndBuffer struct is actually a bit over 2048 bytes,
// so we're really allocating roughly 2x more than what was asked
const cvar_t* cv = Cvar_Get( "com_soundMegs", DEF_COMSOUNDMEGS, CVAR_LATCH | CVAR_ARCHIVE ); const cvar_t* cv = Cvar_Get( "com_soundMegs", DEF_COMSOUNDMEGS, CVAR_LATCH | CVAR_ARCHIVE );
Cvar_SetRange( "com_soundMegs", CVART_INTEGER, "1", "64" ); Cvar_SetRange( "com_soundMegs", CVART_INTEGER, "1", "64" );
Cvar_SetHelp( "com_soundMegs", "sound system buffer size [MB]" ); Cvar_SetHelp( "com_soundMegs", "sound system buffer size [MB]\n"
int scs = cv->integer * 1024; "It allocates from " S_COLOR_CVAR "com_hunkMegs" S_COLOR_HELP "'s pool." );
const int scs = cv->integer * 1024;
sndbuffers = (sndBuffer*)Hunk_Alloc( scs * sizeof(sndBuffer), h_high ); sndbuffers = (sndBuffer*)Hunk_Alloc( scs * sizeof(sndBuffer), h_high );
sndmem_avail = scs * sizeof(sndBuffer); sndmem_avail = scs * sizeof(sndBuffer);