Browse Source

Corrected issue with possible 0 division

Reported on rfxgen tool, it crashes on some parameters
pull/775/head
raysan5 5 years ago
parent
commit
d7fd6e0f1a
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/raudio.c

+ 1
- 1
src/raudio.c View File

@ -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…
Cancel
Save