Re: Problems when changing sample rate on a aggregate device
Re: Problems when changing sample rate on a aggregate device
- Subject: Re: Problems when changing sample rate on a aggregate device
- From: Jeff Moore <email@hidden>
- Date: Thu, 6 Dec 2007 15:07:44 -0800
On Dec 6, 2007, at 1:00 PM, Stéphane Letz wrote:
OK. So changing one of th sub-device SR appears to be a quite
"disruptive" event.
Yup. Anything that causes the aggregate to juggle it's setup is very
disruptive. It also takes a lot longer to churn through everything.
Not sure our application can deal with that (that is is input or
ouput device just disappear...) Are applications supposed to deal
with this kind of context change? Any notification that should be
listened to?
Apps very much have to deal with this situation. It does come up in
real life from time to time.
Actually HALLab File player seems to handle correctly when SR change
are done directly on the aggregate device (not on the sub-device
which makes sense). But iTunes for example stops playing, and has to
be stopped/started again after a SR change,
This is actually iTunes stopping itself. This is something iTunes has
always done across large-scale hardware set-up changes.
GarageBand refuses to switch to the new SR (probably forcing back
its own SR) but transport keeps moving, but without sound.
GarageBand usually gets unhappy when the sample rate of it's session
doesn't match that of the hardware.
In our application the SR change listerner is called but IOProc is
not called aymore. Setting the new SR in the AUHAL converters and
starting again the AUHAL (AudioUnitStart) works only in some cases
like
- we start the application at 44.k ==> switch SR to 48k in AMS ==>
SR change listerner called ==> use AudioUnitStart ==> AUHAL start
again
- we start the application at 48k ==> switch SR to 44.1k (or 96) in
AMS ==> SR change listerner called ==> use AudioUnitStart ==> AUHAL
does not start...
- we start the application at 96k ==> switch SR to 44.1k (or 48) in
AMS ==> SR change listerner called ==> use AudioUnitStart ==> AUHAL
does not start...
So if SR change is so problematic, maybe the best is to stop
spending too much time on that...
Have you looked into the IO cycle telemetry around these events? The
telemetry includes when configuration changes happen as well as when
IO is started and stopped.
--
Jeff Moore
Core Audio
Apple
_______________________________________________
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