• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Resetting IOAudioEngine Timing Mechanism?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Resetting IOAudioEngine Timing Mechanism? (From: Dirk Musfeldt <email@hidden>)

  • Prev by Date: Re: Stuck MIDI notes
  • Next by Date: a little note about Marc's AU source code
  • Previous by thread: Resetting IOAudioEngine Timing Mechanism?
  • Next by thread: Re: Resetting IOAudioEngine Timing Mechanism?
  • Index(es):
    • Date
    • Thread