• 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
Output unit's input callback: concurrency?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Output unit's input callback: concurrency?


  • Subject: Output unit's input callback: concurrency?
  • From: Seth Willits <email@hidden>
  • Date: Sat, 08 Aug 2015 09:48:12 -0700

I have an output unit setup to pull audio from an audio device, and I've set an input callback on it so I can get that audio and send it off elsewhere. In the input callback I'm calling AudioUnitRender() on the output unit.

If the sample rate in Audio MIDI Setup of the device I'm recording from changes, it's possible for this render call to return -10863 / kAudioUnitErr_CannotDoInCurrentContext.

The header comment for that error says:

	Returned when an audio unit is in a state where it can't perform the requested
	action now - but it could later. Its usually used to guard a render operation
	when a reconfiguration of its internal state is being performed.


If this happens, what should I do? I tried ignoring it, and just waiting until the next input callback and carrying on as usual, but that ends up not working. For example, if the sample rate was changed from 48khz to 96khz, the audio being recorded goes at half-speed and eventually breaks.



--
Seth Willits




 _______________________________________________
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: Re: Offline Rendering... still a thing?
  • Next by Date: Accessing AudioUnit API too quickly on iOS ?
  • Previous by thread: How to connect to Virtual MIDI host on iOS
  • Next by thread: Accessing AudioUnit API too quickly on iOS ?
  • Index(es):
    • Date
    • Thread