瀏覽代碼

Corrected issue with possible 0 division

Reported on rfxgen tool, it crashes on some parameters
pull/775/head
raysan5 5 年之前
父節點
當前提交
d7fd6e0f1a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      src/raudio.c

+ 1
- 1
src/raudio.c 查看文件

@ -367,7 +367,7 @@ static mal_uint32 OnAudioBufferDSPRead(mal_dsp *pDSP, mal_uint32 frameCount, voi
{
AudioBuffer *audioBuffer = (AudioBuffer *)pUserData;
mal_uint32 subBufferSizeInFrames = audioBuffer->bufferSizeInFrames/2;
mal_uint32 subBufferSizeInFrames = p">(audioBuffer->bufferSizeInFrames > 1)? audioBuffer->bufferSizeInFrames/2 : audioBuffer->bufferSizeInFrames;
mal_uint32 currentSubBufferIndex = audioBuffer->frameCursorPos/subBufferSizeInFrames;
if (currentSubBufferIndex > 1)

Loading…
取消
儲存