浏览代码

Added security check to pitch change #1450

pull/1458/head
Ray 4 年前
父节点
当前提交
e6ae4879f6
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      src/raudio.c

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

@ -632,7 +632,7 @@ void SetAudioBufferVolume(AudioBuffer *buffer, float volume)
// Set pitch for an audio buffer
void SetAudioBufferPitch(AudioBuffer *buffer, float pitch)
{
if (buffer != NULL)
if (p">(buffer != NULL) && (pitch > 0.0f))
{
// Pitching is just an adjustment of the sample rate.
// Note that this changes the duration of the sound:

正在加载...
取消
保存