ryukau / VSTPlugins

Uhhyou Plugins VST 3 repository.

Home Page:https://ryukau.github.io/VSTPlugins/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Comparison issue in L*Reverb/source/dsp/delay.hpp

EleonoreMizo opened this issue · comments

Hi,

This is probably not important at all but I wanted to let you know. While checking the LatticeReverb source code, I found in NestedLongAllpass::process() the following code: for (size_t idx = nest - 1; idx < nest; --idx) (line 155 at the moment). This looks like a copy/paste error, the condition should be idx != size_t (-1). Actually it works as intended because size_t is an unsigned type, and when idx wraps to 0xFFF…FFF, the condition becomes false whatever the nest value. But reading the code is a bit misleading and it could become a bug if the counter type is changed. There is the same error in L3Reverb and L4Reverb.

Anyway thank you for these reverbs. I was impressed by the L4 video.

Hi, @EleonoreMizo.

Thanks for pointing out. I changed the conditions to idx != size_t(-1) (commit 9dc2c4b).

Just in case, CI is failing because of some changes of VST 3 SDK (it says vstgui.h is missing). I'll look into it when I have a time.


For the record, idx < nest conditions were intended. The reasons behind this style is that:

  • Positive or negative overflow of unsigned types is defined in C++ standard.
  • size_t is guaranteed to be unsigned.

Similar conditions may be found in this repository. If someone finds those conditions, and no warning comment is around, then please let me know. I'll change them.