• 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: how to access HAL buffer timestamps when using AUHAL?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to access HAL buffer timestamps when using AUHAL?


  • Subject: Re: how to access HAL buffer timestamps when using AUHAL?
  • From: Jeff Moore <email@hidden>
  • Date: Fri, 10 Jul 2009 10:15:44 -0700


On Jul 9, 2009, at 9:40 PM, Ross Bencina wrote:

We're using AUHAL in PortAudio and we need to report current time and timestamps for when the first sample of each buffer is received from/enters the hardware. My research suggests that when using HAL directly we could use the mHostTime fields of the inNow, inInputTime and inOutputTime parameters of AudioDeviceIOProc:

typedef OSStatus (*AudioDeviceIOProc)(
AudioDeviceID inDevice,
const AudioTimeStamp*inNow,
const AudioBufferList*inInputData,
const AudioTimeStamp*inInputTime,
AudioBufferList*outOutputData,
const AudioTimeStamp*inOutputTime,
void*inClientData);

However, the AUHAL render proc looks like this:

OSStatus AudioIOProc( void *inRefCon,
AudioUnitRenderActionFlags *ioActionFlags,
const AudioTimeStamp *inTimeStamp,
UInt32 inBusNumber,
UInt32 inNumberFrames,
AudioBufferList *ioData );

I can't find documentation for what inTimeStamp means in this context. Could someone please clarify the meaning of it for me?

AUHAL has it's own management of it's timeline so that it can do things like account for dropped samples due to overloads or other changes in state, not to mention any rate conversion that it might be doing. To get it to pass along the HAL's timestamps, you can set the property, kAudioOutputUnitProperty_StartTimestampsAtZero, to false.


More importantly, we need access to all three HAL timestamps (now, inputTime, outputTime). So my question is: how can I recover these three HAL timestamps from within my AUHAL render proc?


I don't believe that AUHAL provides any access to the now time stamp.

--

Jeff Moore
Core Audio
Apple



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: how to access HAL buffer timestamps when using AUHAL?
      • From: "Ross Bencina" <email@hidden>
    • Re: how to access HAL buffer timestamps when using AUHAL?
      • From: William Stewart <email@hidden>
References: 
 >how to access HAL buffer timestamps when using AUHAL? (From: "Ross Bencina" <email@hidden>)

  • Prev by Date: Re: AudioFileOpenWithCallbacks...
  • Next by Date: Re: how to access HAL buffer timestamps when using AUHAL?
  • Previous by thread: how to access HAL buffer timestamps when using AUHAL?
  • Next by thread: Re: how to access HAL buffer timestamps when using AUHAL?
  • Index(es):
    • Date
    • Thread