Skip to content

Commit 1d5e050

Browse files
committed
fix an issue with very low buffers
1 parent 3a29376 commit 1d5e050

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

engine/audio/private/snd_dev_direct.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ int CAudioDirectSound::PaintBegin( float mixAheadTime, int soundtime, int painte
343343
if (endtime <= paintedtime)
344344
return endtime;
345345

346-
int samps = DeviceSampleCount() / DeviceChannels();
346+
int samps = max(1, DeviceSampleCount() / DeviceChannels());
347347

348348
if ((int)(endtime - soundtime) > samps)
349349
endtime = soundtime + samps;

0 commit comments

Comments
 (0)