From 316830895a91bfe9111230918960ab143c9db935 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Tue, 11 Mar 2014 17:15:55 -0500 Subject: 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). --- src/client/snd_mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 -- cgit