help: input only AUHAL AudioUnitRender returns kAudioUnitErr_CannotDoInCurrentContext after sample rate change
help: input only AUHAL AudioUnitRender returns kAudioUnitErr_CannotDoInCurrentContext after sample rate change
- Subject: help: input only AUHAL AudioUnitRender returns kAudioUnitErr_CannotDoInCurrentContext after sample rate change
- From: "Ross Bencina" <email@hidden>
- Date: Thu, 2 Sep 2010 01:26:48 +1000
Hi Guys
We're trying to debug an AUHAL problem in PortAudio and I'm wondering if
anyone can offer any suggestions for what might be going on here...
The problem is that for input-only (capture) AUHAL, AudioUnitRender() is
sometimes returning kAudioUnitErr_CannotDoInCurrentContext. So far, we have
found that it is triggered by two different conditions:
1. While the stream is running, sourced from the SPDIF input, change the
sample rate (eg by unplugging the SPDIF from a CD player and into a DVD
player). the error happens when the incoming sample rate changes.
2. Using Soundflower as the input device, first open-run-close a 44.1k
stream, then a 96k stream, then a 44.1k stream. the error happens after
starting the 3rd stream.
Does this look familiar to anyone?
I notice here, there is a suggestion that if there is a sample rate mismatch
in the stream format then the error may be returned:
http://lists.apple.com/archives/coreaudio-api/2009/Jul/msg00103.html
What is the correct way to handle this kind of external sample rate change
in case (1) above? Do we need to stop the capture, reconfigure the stream
and restart the capture or can we do it on the fly somehow?
Thanks!
Ross.
_______________________________________________
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