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).
This commit is contained in:
Zack Middleton 2014-03-11 17:15:55 -05:00
parent a167110f43
commit 0e6632f464

View file

@ -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