WaveEdit icon indicating copy to clipboard operation
WaveEdit copied to clipboard

Setting WAVE_LEN to something bigger than 256 crashes app

Open christoph-hart opened this issue 6 years ago • 1 comments

Awesome project but the exported length of 256 samples per wavetable is a bit unambitious. However setting the WAVE_LEN constant to something bigger crashes the app. Would be great to be able to set this to at least 512 or 1024.

christoph-hart avatar Mar 26 '18 07:03 christoph-hart

I just forked the repo and had a very brief look at it: except for util.cpp WAVE_LEN seems to be used consequently, but I have a hunch that some data types might not be appropriate when increasing WAVE_LEN. E.g. src/db.cpp: int16_t *samples_i16 = new int16_t[BANK_LEN * WAVE_LEN]; Here the product should be < 32768, which is only true for WAVE_LEN = 256, AFAIK.

I didn't browse thoroughly but I suspect it's something of that kind. I'm not a programmer and alas I can't compile at all since carbon.h of libsndfile has issues (potentially deprecated). So ... I think it would be fixable and amendable in a way passing a parameter to the program setting WAVE_LEN accordingly. If this is defaulted to 256 it should also behave as initially intended. Michael.

miczac avatar Jan 06 '19 23:01 miczac