• 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
OSX callback, is this OK?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

OSX callback, is this OK?


  • Subject: OSX callback, is this OK?
  • From: Paul Fredlein <email@hidden>
  • Date: Tue, 18 Jan 2011 09:55:58 +1000

Hi,

I'm recording to a single buffer as I need to only capture x seconds of audio. I've determined the buffer size by the number of seconds I need to record so when the buffer is full it stops recording. The maximum recording duration varies from 1 second to about 5 seconds maximum.

The file is called audioAppDelegate.m  and in my callback I'm using 'self' as the 'inUserData'.

// set record callback
AudioQueueNewInput(&asbdRecord, recordCallback, self, NULL, NULL, 0, &queueRecord);


In my callback, I need to stop recording when the single buffer is full.

 [(audioAppDelegate*)inUserData performSelectorOnMainThread:@selector(stopRecording:) withObject:nil waitUntilDone:NO];

This works but there must be a better way. Any help appreciated, thanks.

Regards,

Paul

 _______________________________________________
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

  • Follow-Ups:
    • Re: OSX callback, is this OK?
      • From: Brian Willoughby <email@hidden>
  • Prev by Date: plugin sounds before input arrives
  • Next by Date: Re: OSX callback, is this OK?
  • Previous by thread: Re: plugin sounds before input arrives
  • Next by thread: Re: OSX callback, is this OK?
  • Index(es):
    • Date
    • Thread