Re: help: input only AUHAL AudioUnitRender returns kAudioUnitErr_CannotDoInCurrentContext after sample rate change
Re: help: input only AUHAL AudioUnitRender returns kAudioUnitErr_CannotDoInCurrentContext after sample rate change
- Subject: Re: help: input only AUHAL AudioUnitRender returns kAudioUnitErr_CannotDoInCurrentContext after sample rate change
- From: William Stewart <email@hidden>
- Date: Wed, 1 Sep 2010 12:56:33 -0700
On Sep 1, 2010, at 8:26 AM, Ross Bencina wrote:
> 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.
Yes, AUHAL won't do a rate conversion for you in 10.6. You can listen to the sample rate changing and reconfigure the AU to deal with that changing condition
>
> 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
_______________________________________________
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