diff --git a/source/lib/res/sound/snd_mgr.cpp b/source/lib/res/sound/snd_mgr.cpp index a1de6394ef..3948736809 100644 --- a/source/lib/res/sound/snd_mgr.cpp +++ b/source/lib/res/sound/snd_mgr.cpp @@ -2098,15 +2098,15 @@ LibError snd_set_gain(Handle hvs, float gain) * the sound has already been closed (e.g. it never played). * * @param hvs Handle to VSrc - * @param pitch shift: 1.0 means no change; each reduction by 50% equals a - * pitch shift of -12 semitones (one octave). zero is invalid. + * @param pitch shift: 1.0 means no change; each doubling/halving equals a + * pitch shift of +/-12 semitones (one octave). zero is invalid. * @return LibError */ LibError snd_set_pitch(Handle hvs, float pitch) { H_DEREF(hvs, VSrc, vs); - if(!(0.0f < pitch && pitch <= 1.0f)) + if(pitch <= 0.0f) WARN_RETURN(ERR::INVALID_PARAM); vs->pitch = pitch; diff --git a/source/lib/res/sound/snd_mgr.h b/source/lib/res/sound/snd_mgr.h index f864a24ad3..3dcac6351f 100644 --- a/source/lib/res/sound/snd_mgr.h +++ b/source/lib/res/sound/snd_mgr.h @@ -240,8 +240,8 @@ extern LibError snd_set_gain(Handle hs, float gain); * may be called at any time; fails with invalid handle return if * the sound has already been closed (e.g. it never played). * - * @param pitch 1.0 means no change; each reduction by 50% equals a - * pitch shift of -12 semitones (one octave). zero is invalid. + * @param pitch shift: 1.0 means no change; each doubling/halving equals a + * pitch shift of +/-12 semitones (one octave). zero is invalid. * @return LibError **/ extern LibError snd_set_pitch(Handle hs, float pitch);