• 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: Fri, 8 Nov 2002 13:56:25 -0800

In terms of the IOAudio family, the kernel trap the HAL enters becomes a call to IOAudioEngine::performClientIO() which filters down to calling various methods on your driver. An error returned from IOAudioEngine::performClientIO() will cause the HAL to resynch.

On Friday, November 8, 2002, at 01:16 PM, Dirk Musfeldt wrote:

What do you mean with "error returned from the kernel trap"?

As I understand it there is no call into my audio engine. I just don't call
timestamp() and do not iterate the current sample frame.

How do I return an error on this?


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/>


Von: Jeff Moore <email@hidden>
Datum: Wed, 30 Oct 2002 11:36:38 -0800
An: CoreAudio API <email@hidden>
Betreff: Re: Resetting IOAudioEngine Timing Mechanism?

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.




--

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.

  • Follow-Ups:
    • My Sampler Output
      • From: Jeremy Sagan <email@hidden>
References: 
 >Re: Resetting IOAudioEngine Timing Mechanism? (From: Dirk Musfeldt <email@hidden>)

  • Prev by Date: Use of MIDIRawData and others non midi standards events
  • Next by Date: Re: MOTU Fastlane MIDI driver wastes 10-25% CPU
  • Previous by thread: Re: Resetting IOAudioEngine Timing Mechanism?
  • Next by thread: My Sampler Output
  • Index(es):
    • Date
    • Thread