size calculation bug in libs/openFrameworks/sound/ofOpenALSoundPlayer.cpp

Hi,

not sure if this is the right place (is there a bug tracker?). I wanted to try out the FFT soundPlayer example on my 64 bit Kubuntu Natty system but only got a nice crash due to heap corruption.

I tracked it to an incorrect initialisation in ofOpenALSoundPlayer::createWindow which allows a dynamic size value for the Hamming window coefficients array but while calculating does not use this information but simply assumes 512 bands which of course crashes horribly when only 128 are requested.

I fixed it with the attached diff (against the master).

Curiously, does noone use OpenAL or why am I the only one noticing this? ???

fix_ofxOpenALSoundPlayer_window_calculation.txt

oh, thanks, don’t even know why that *2 is there

it’s fixed in master now