[quake3-commits] r1622 - trunk/code/client
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Tue Sep 15 02:19:04 EDT 2009
Author: icculus
Date: 2009-09-15 02:19:04 -0400 (Tue, 15 Sep 2009)
New Revision: 1622
Modified:
trunk/code/client/snd_dma.c
Log:
Prevent hang in S_UpdateBackgroundTrack() with some sample rates.
Fixes Bugzilla #4022.
Modified: trunk/code/client/snd_dma.c
===================================================================
--- trunk/code/client/snd_dma.c 2009-09-15 06:15:00 UTC (rev 1621)
+++ trunk/code/client/snd_dma.c 2009-09-15 06:19:04 UTC (rev 1622)
@@ -1374,6 +1374,9 @@
// decide how much data needs to be read from the file
fileSamples = bufferSamples * s_backgroundStream->info.rate / dma.speed;
+ if (!fileSamples)
+ return;
+
// our max buffer size
fileBytes = fileSamples * (s_backgroundStream->info.width * s_backgroundStream->info.channels);
if ( fileBytes > sizeof(raw) ) {
More information about the quake3-commits
mailing list