Re: kAudioDevicePropertyStreamFormat notification
Re: kAudioDevicePropertyStreamFormat notification
- Subject: Re: kAudioDevicePropertyStreamFormat notification
- From: Jeff Moore <email@hidden>
- Date: Mon, 02 Jul 2001 12:30:31 -0700
on 7/2/01 5:25 AM, Markus Handell <email@hidden> wrote:
>
In which context do I get the kAudioDevicePropertyStreamFormat property
>
listener callout, in the UI thread or the RT-thread?
Format notifications take place on the CFRunLoop specified by
kAudioHardwarePropertyRunLoop. This is specifiable by the application. By
default is the the thread that CoreServices.framework is initialized on, or
if CoreServices isn't present, the thread that the first call to a routine
in <CoreAudio/AudioHardware.h> takes place in.
>
What can cause this notification? The user or some other application?
Yes, both can.
>
Does CoreAudio stop the IOProc:ing when it decides the stream format has
>
changed, or does it merrily continue to be called? The reason I'm asking
>
is that we might have auxiliary data used in the IOProc, If the
>
notification comes in the UI thread I'd have to develop synchronization
>
means. I'd rather not.
The IOProc will pause because the hardware stops as a result of a format
change. It will restart as soon as the hardware says it's ready. Logically,
it will appear as a discontinuity in the time stream (the time will reset to
0).
--
Jeff Moore
Core Audio
Apple