diff options
author | Zack Middleton <zturtleman@gmail.com> | 2014-03-11 17:15:55 -0500 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2014-06-17 17:43:41 +0100 |
commit | 316830895a91bfe9111230918960ab143c9db935 (patch) | |
tree | 8c9c745ec69db0e42f4b009b88238eac77572bc5 /src/client | |
parent | 2c37616a88f1ab966c3de89512843bd7fab8216a (diff) |
DMA 44100Hz needs more memory for sound buffers
It doubles the size of the data compared to the default (22050),
so increase the buffer automatically. Likewise, decreasing speed
doesn't need as much (though that doesn't really matter).
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/snd_mem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/snd_mem.c b/src/client/snd_mem.c index 299d9d34..f3401fcb 100644 --- a/src/client/snd_mem.c +++ b/src/client/snd_mem.c @@ -82,7 +82,7 @@ void SND_setup(void) { cv = Cvar_Get( "com_soundMegs", DEF_COMSOUNDMEGS, CVAR_LATCH | CVAR_ARCHIVE ); - scs = (cv->integer*1536); + scs = (cv->integer*1536*dma.speed/22050.0f); buffer = malloc(scs*sizeof(sndBuffer) ); // allocate the stack based hunk allocator |