Re: Resetting IOAudioEngine Timing Mechanism?
Re: Resetting IOAudioEngine Timing Mechanism?
- Subject: Re: Resetting IOAudioEngine Timing Mechanism?
- From: Jeff Moore <email@hidden>
- Date: Wed, 30 Oct 2002 11:36:38 -0800
The HAL will always resynch if an error is returned from the kernel
trap, which should happen because the HAL is asking for data that you
don't have yet because your interrupts were held off too long. But, you
really don't want to be in this situation at all.
BTW, changing the screen resolution is not what I would consider a high
load situation (the video driver probably does disable interrupts for a
short period of time, but it would be considered a bug in the video
driver if it did this to the point where audio glitches). More likely,
your problems are due to how you've structured when and where the work
gets done by your driver.
If you are depending on a software interrupt that is queued from your
primary interrupt handler to do all your work, you are going to run
into this situation under a real load situation, say where an app is
using most of the available time in the HAL's IO thread. In this
situation, your driver's work loop that handles the software interrupt
runs at a lower priority than the HAL's IO thread, so it will lose out
and be held off. The only way around this is to do more of your work on
the primary interrupt. But, you'll have to balance this against the
requirements of the rest of the system so that you are not doing so
much work in the primary interrupt that you cause long scheduling
latencies in the HAL's IO thread. Also, if you aren't taking your time
stamps from the primary interrupt, you are also going to be in trouble
because of this situation.
On Wednesday, October 30, 2002, at 07:34 AM, Dirk Musfeldt wrote:
Hi,
is it possible to reset the IOAudioEngine timing mechanism?
I have an IOAudioEngine that splits the sample buffer used by the
IOAudioStream into several smaller buffers used by the hardware. The
hardware sets interrupts on the completion of each of the small
buffers.
But if the system load is high, i.e. the screen resolution is changed,
my
IOInterruptEventSource routine is called with higher latency and the
CoreAudio passes the read head and reads the input samples in front of
it.
Is there an way to restart the mechanism from the driver?
Of course I could use setSampleOffset to set a greater offset but as I
have
to synchronize with video I need the small offset or you will notice
the
delay.
With kind regards
Dirk Musfeldt
Meilenstein Mac OS Software
Neue Strasse 5
D-31582 Nienburg
Germany
Tel: +49 (0) 5021 91 24 44
Fax: +49 (0) 5021 91 24 45
<http://www.meilenstein.de/>
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
--
Jeff Moore
Core Audio
Apple
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.