[Darwine] Re: Mac OS X Audio driver
jim at pagesmiths.com
Thu May 25 21:00:41 CDT 2006
Alexandre Julliard wrote:
> Emmanuel Maillard <mahanuu at opendarwin.org> writes:
>>All callback used by CoreAudio/AudioUnit are call from a thread
>>created by CoreAudio.
>>Its why i can't use debug channels, critical section and call
>>DriverCallback directly ...
> Yes, you can't do much without a valid thread. That's really a broken
> API if you ask me... Anyway, please remove the #ifdefs, and add
> comments to the functions that run in a foreign thread to ensure that
> no one tries to call Windows APIs from there.
Well, given the demands of real-time programming, such a design is to be
expected. It's called an interrupt.
If you want to run code on your own thread, create it and block on a
semaphore. The interrupt sets the semaphore and returns.
More information about the wine-devel