diff options
| author | Ray <[email protected]> | 2020-12-12 13:07:46 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2020-12-12 13:07:46 +0100 |
| commit | e6ae4879f68f0ec5e4e6cb3841efc8ff110a0e43 (patch) | |
| tree | 6365cb254ba1759295db03d577b8b1ac1994436f /src/raudio.c | |
| parent | 459c4754dc2fc51848d7245f0301d8ed1f5121bc (diff) | |
| download | raylib-e6ae4879f68f0ec5e4e6cb3841efc8ff110a0e43.tar.gz raylib-e6ae4879f68f0ec5e4e6cb3841efc8ff110a0e43.zip | |
Added security check to pitch change #1450
Diffstat (limited to 'src/raudio.c')
| -rw-r--r-- | src/raudio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/raudio.c b/src/raudio.c index 8859547e..0e378c80 100644 --- a/src/raudio.c +++ b/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 ((buffer != NULL) && (pitch > 0.0f)) { // Pitching is just an adjustment of the sample rate. // Note that this changes the duration of the sound: |
