Re: Newbie documentation for MIDI
Re: Newbie documentation for MIDI
- Subject: Re: Newbie documentation for MIDI
- From: Michael Bishop <email@hidden>
- Date: Tue, 26 Nov 2002 23:20:07 -0800 (PST)
Originally I was just looking for something that would be simple enough for my real-time thread to notify my UI thread that there was more MIDI available for it to process and nothing more really. I wanted the real-time thread to send a message without blocking, but I didn't need the messaging technique to be really complex and the UI didn't need to update immediately, just in a reasonable amount of time.
I'm going to check out a couple of things:
- There's a variant of NSNotificationCenter called "NSNotificationQueue" that might work nicely (Robert, you might be interested in this). Notifications that you post to it are non-blocking (the observer will not be called in the real-time thread) and it has the ability to coalesce similar notifications. This allows me to tell the UI thread "MIDI available" over and over every time I get MIDI, but the UI thread will only get the notification once because the other notifications have coalesced into one.
http://developer.apple.com/techpubs/macosx/Cocoa/TasksAndConcepts/ProgrammingTopics/Notifications/Concepts/NotificationQueues.html
- DO messaging. I like the idea of setting up a private connection be tween two objects where one can produce and the other can consume. That might come in handy in other situations.
Thanks for all the advice. It has given me some good places to go.
_ michael
_______________________________________________
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.