If you ported the code "as is", there should be a delay of 100 seconds before drawing anything, i guess that's not what you expect.
So, divide THREAD_SLEEP_TIME by 1000.
Next, i don't really know what you mean by "buffer overrun", maybe because i never used PD on Windows ???
i am not sure what a buffer overrun is either . i am imagining its just means that the program is writing to an array past the end of the declared array space .
i have narrowed it down to crashing after the the record button is pressed that the sample is done playing .
well, i can only guess here.
when recording is finished, a thread is created in order to send all graphic data to the GUI.
uncomment the following line :
// post( "sonogram~ : stopped recording" );
and tell me if this appears in the log.
regards,
yves.
for fun, i translated my page to french with google and got this : http://ydegoyon.free.fr/fr.html
that's funny for those who can read french, sorry.