--- code/client/snd_dma.c +++ code/client/snd_dma.c @@ -1378,6 +1378,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) ) {