Fixed an issue where SetAudioBufferPitch could not be dynamically changed

This commit is contained in:
jdeokkim 2020-12-05 05:43:09 +00:00
parent 62406259d7
commit d33b63a50d

View File

@ -632,7 +632,7 @@ void SetAudioBufferVolume(AudioBuffer *buffer, float volume)
// Set pitch for an audio buffer // Set pitch for an audio buffer
void SetAudioBufferPitch(AudioBuffer *buffer, float pitch) void SetAudioBufferPitch(AudioBuffer *buffer, float pitch)
{ {
if (buffer != NULL) if (buffer != NULL && buffer->pitch != pitch)
{ {
float pitchMul = pitch/buffer->pitch; float pitchMul = pitch/buffer->pitch;