소스 검색

Added security check to pitch change #1450

pull/1458/head
Ray 5 년 전
부모
커밋
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:

불러오는 중...
취소
저장