• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
objc calls inside property listeners
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: AudioConverterFillComplexBuffer - ioOutputDataPacketSize for converting aac into lpcm
  • Next by Date: Re: looping with start offset
  • Previous by thread: AudioConverterFillComplexBuffer - ioOutputDataPacketSize for converting aac into lpcm
  • Next by thread: Setting AUSampler polyphony when loading samples directly
  • Index(es):
    • Date
    • Thread