External Plugin returning too quickly

Brad Fuller brad at sonaural.com
Sun Nov 20 02:42:44 UTC 2005


The plugin that I'm creating seems to return too quickly. I have a 
simple test that plays a sine wave and waits 5 seconds (using usleep). 
The problem is that it stops the sine wave and returns in about a half a 
second (I hear the sine wave but just a blip. And no errors from the 
external code.) The code works fine outside of Squeak, but not called 
from Squeak.

The plugin does 2 simple things:
* Starts a stream that calls a callback routine (below)
* The callback fills a buffer for the sine wave data and then returns
After waiting 5secs, the main line cleans up and exits.

Are there any particular issues with callbacks in Squeak? Do I need to 
compile/link with anything special? It doesn't seem like this should be 
a problem since Squeak is single-threaded. If anything, I would think 
that the return would be slower not quicker. BTW, usleep returns w/o error.

Any ideas or pointers much appreciated!

brad


-- 
Brad Fuller
(408) 799-6124
** Sonaural Audio Studios **
(408) 799-6123  West San Jose
(408) 799-6124  Cambrian
________________________________
Hear us online: www.Sonaural.com
See me on O'Reilly: http://www.oreillynet.com/pub/au/2184




More information about the Vm-dev mailing list