From: Lisa J. P. <li...@th...> - 2003-07-20 11:09:35
|
On Sun, 20 Jul 2003, Peter Wang wrote: > What about the _AL_SGIAL_PORTSIZE and _AL_SGIAL_BUFFERSIZE constants? The problem with them is that the timer callback that calls the driver so it can mix and output sound isn't called often enough for the sound buffers to not underflow. As such, I've just finished a bit of a nasty hack. The driver has been modified so that if it detects it's running with pthreads (using the threaded parameter to the callback), then it spawns off a new thread, which blocks until more sound data is required, refills the buffer, and then repeats. This appears to radically improve the performance of Allegro on IRIX. If someone could tell me a better way of detecting whether threading is in use, I'll clean it up. On another note, killing the window to my program doesn't seem to quit the program. (The thread in the hacked driver is pthread_cancelled when the driver is deinitialised.) I've tried to hook the window close call back, but it doesn't help. Any advice? -- Lisa - http://www.thecommune.org.uk/~lisa - http://www.lisastoys.co.uk/ SBS#37(with oak leaf cluster) two#40 DOGMUK Suzuki GS125ES My other car's a cdr |