From 0e6632f464c08dcb76f26a52f33d97228e64fda1 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Tue, 11 Mar 2014 17:15:55 -0500 Subject: [PATCH] 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). --- code/client/snd_mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/client/snd_mem.c b/code/client/snd_mem.c index 655ae420..39615d83 100644 --- a/code/client/snd_mem.c +++ b/code/client/snd_mem.c @@ -81,7 +81,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