Просмотр исходного кода

Fix for short non-looping sounds (#1067)

Short non-looping sounds can sometimes think they need to keep playing and will output their first few frames again. This helps to break out of all the loops instead of just this one.
pull/1071/head
jbosh 5 лет назад
committed by Ray
Родитель
Сommit
019434a37e
1 измененных файлов: 6 добавлений и 0 удалений
  1. +6
    -0
      src/raudio.c

+ 6
- 0
src/raudio.c Просмотреть файл

@ -324,6 +324,12 @@ static void OnSendAudioDataToDevice(ma_device *pDevice, void *pFramesOut, const
framesToRead -= framesJustRead;
framesRead += framesJustRead;
}
if (!audioBuffer->playing)
{
framesRead = frameCount;
break;
}
// If we weren't able to read all the frames we requested, break
if (framesJustRead < framesToReadRightNow)

Загрузка…
Отмена
Сохранить