objc calls inside property listeners
objc calls inside property listeners
- Subject: objc calls inside property listeners
- From: steph ohara <email@hidden>
- Date: Tue, 22 May 2012 19:54:03 -0700 (PDT)
I am wanting to send notifications to my app (ui/main thread) when i get AudioRouteChanges and Interruptions.
My current implementation is to send a message to an objc object which in turns sends an NSNotification.
It works but i don't want to test this properly over and over by pluggin headphones in/out.
I am wondering how safe this is : can i use performSelectorOnMainThread inside a propertyListener callback?
eg.
objcClassInstance = inClientData;
[objcClassInstance performSelectorOnMainThread:@selector(someSelector:)
withObject:[NSNotification notificationWithName:@"kAudioSessionProperty_AudioRouteChange"
object:objcClassInstance]
waitUntilDone:NO];
i am assuming that all property listener callbacks are not on the audio thread and thus can use/call objc.
cheers steph
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden