grame-cncm / faust

Functional programming language for signal processing and sound synthesis
http://faust.grame.fr
Other
2.58k stars 322 forks source link

Bela: `nvoices` is only initialized `#ifdef NVOICES` #256

Closed giuliomoro closed 5 years ago

giuliomoro commented 5 years ago

nvoices is only initialized #ifdef NVOICES https://github.com/grame-cncm/faust/blob/master-dev/architecture/bela.cpp#L425 so that if POLY2 is defined buy not NVOICES, thennvoices` is used uninitalized at row

    dsp_poly = new mydsp_poly(new mydsp(), nvoices, true, true);

what should nvoices be initialized to when NVOICES is not defined? It looks like both nvoices and dsp_poly are needed only when at least one of NVOICES and POLY2 are defined

sletz commented 5 years ago

OK, Raphaël wrote this code which is actually different for the one in other architectures. So I just reworked it to match what is done in other architectures, see https://github.com/grame-cncm/faust/commit/68cd736b59f8cdb9821deb0399bee920f810bb39 (blind commit here...)

giuliomoro commented 5 years ago

thanks. doesn't compile, I added some inline notes on the commit.

sletz commented 5 years ago

Should be fixed in https://github.com/grame-cncm/faust/commit/f762576a3e3fcfeb383d4e56a939ec2c10457c8b

giuliomoro commented 5 years ago

Almost. I have a couple of fixes in PR #258