Re: Sound Manager & MIDI callbacks, interrupts and threads
Re: Sound Manager & MIDI callbacks, interrupts and threads
- Subject: Re: Sound Manager & MIDI callbacks, interrupts and threads
- From: Andy Robinson <email@hidden>
- Date: Mon, 18 Feb 2002 14:47:51 +0000
Thanks again for more replies.
What I now plan to do is this. I'm going to ignore the instruction not
to put a lock in a callback since some people tell me that in fact a
lock is ok, and no-one has proposed any other way of protecting critical
sections. If anyone is going to tell me again not to do this, then
please tell me what I _should_ do instead. In fact, is the instruction
not to put a lock in a callback a hangover from Classic Mac when the
callback would be running in "interrupt time" rather than a true thread
of its own?
I've downloaded the excellent pthread reference that someone gave a
pointer to:
http://www.tru64unix.compaq.com/docs/base_doc/DOCUMENTATION/
V51A_PDF/ARH9RBTE.PDF
And then I wrap pthread_mutex_lock/unlock around the critical bits of
queue manipulation in both the main app code and the callback. Seems to
work ok, I'll think again if it crashes.
Easy when you know how. Thanks again.
Andy Robinson, Seventh String Software, www.seventhstring.demon.co.uk
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.