• 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: timers in AudioHardwarePlugin
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: timers in AudioHardwarePlugin


  • Subject: Re: timers in AudioHardwarePlugin
  • From: Stefan Werner <email@hidden>
  • Date: Mon, 4 Aug 2003 18:40:03 +0200

Hi Philippe,

On Sunday, Aug 3, 2003, at 16:04 Europe/Berlin, Philippe Wicker wrote:
For instance, a call to a 10 microsec sleep time using nanosleep takes an average time of about 25 microsec on a DP867. Using usleep yields similar results. The error may however be greater than (25 minus 10) because this is a best case value (everything is on the L1 cache, the 1st call to nanosleep takes about 65 microsec) and the cpu may be used by some other threads while your's is sleeping and be yielded the cpu again a much longer time after (depending on its scheduling and priority settings).

Thanks, that'll work for now. Since I'm using that as a replacement for the audio hardware's buffer interrupt, usleep() is OK, I'm using sleep times in the magnitude of msecs - a jitter of <50 microsecs should be fine for my applications. Also, I think that being a plugin of the HAL should give my thread a higher priority than most tasks. I just wasn't sure wether it's appropriate to use POSIX calls for timing inside the HAL or if the CoreAudio is providing its own function for timing.

Stefan
_______________________________________________
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: 
 >Re: timers in AudioHardwarePlugin (From: Philippe Wicker <email@hidden>)

  • Prev by Date: Re: AudioConverterFillComplexBuffer error 58284: SOLVED!
  • Next by Date: want to consult with a developer for a MIDI driver plug-in
  • Previous by thread: Re: timers in AudioHardwarePlugin
  • Next by thread: AudioConverterFillComplexBuffer error 58284
  • Index(es):
    • Date
    • Thread