Output unit's input callback: concurrency?
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