zamaudio / zam-plugins

Collection of LADSPA/LV2/VST/JACK audio plugins for high-quality processing
http://www.zamaudio.com/?p=976
GNU General Public License v2.0
265 stars 37 forks source link

ZamHeadX2 array indices swapped #98

Closed Hamster128 closed 8 months ago

Hamster128 commented 9 months ago

Hi,

I just build your ZamHeadX2 plugin, and on the way to understand the parameters, i think i came across a bug. It seems that the dimensions of the fir_left/right arrays are swapped:

void ZamHeadX2Plugin::reload() elev 0 - 24 azim 0 - 49

clv_configure("convolution.ir.preset", elev, azim);

. . .

LV2convolv::clv_configure (const char key, const char elev, const char* azim)

ir_presetx = atoi(elev); // 0 - 24 ir_presety = atoi(azim); // 0 - 49

. . .

LV2convolv::clv_initialize (

fir_coeffs_lr[2 i] = fir_left[ir_presetx][ir_presety][i]; fir_coeffs_lr[2 i + 1] = fir_right[ir_presetx][ir_presety][i];

here we have fir_left[ 0 - 24 ][ 0 - 49 ] [i] but it was defined with swapped ranges: static const float fir_left[50][25][200] = {

zamaudio commented 8 months ago

Thanks for bug report, will address soon.

zamaudio commented 8 months ago

Fixed in 4.2