I've posted a substantial patch to audio.c which reorganises the code to make it a little easier to follow. It's been tested against HomeWorld and HalfLife. It works against homeworld with MIN_SLEEP_TIME 100, but not with MIN_SLEEP_TIME <=50. Feel free to set MIN_SLEEP_TIME to 0 to remove the minimum sleep time.
The other thing the patch does is makes notifications dependant on bytes played rather than time elapsed.
Should be a win overall. I'm still having no luck with tracking the actual race condition which causes HomeWorld to fail.
I've not tried the patch you sent to fix the callback notification problem yet. I'll let you know when I do.
__________________________________________________ Do You Yahoo!? Find a job, post your resume. http://careers.yahoo.com