• 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: synchronization of input and output
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: synchronization of input and output


  • Subject: Re: synchronization of input and output
  • From: Jeff Moore <email@hidden>
  • Date: Fri, 30 Oct 2009 11:08:48 -0700


On Oct 30, 2009, at 10:49 AM, Taylor Holliday wrote:

Thanks Jeff,

 I'm actually currently using PortAudio, which on each processing
callback provides an inputBufferAdcTime and an outputBufferDacTime. So
as you said, I can just subtract those two quantities to determine the
shift of an input sample relative to an output sample. The difference
must be constant across consecutive callbacks, right?

I can't speak for PortAudio, but that would certainly be the case with the time stamps the HAL provides. The exception would be if your app is making use of the property, kAudioDevicePropertyIOCycleUsage, which would allow you to vary the difference.



 My original motivation for asking is that I'm encountering a problem
in Logic where everything is recorded slightly (audibly) late, so I'm
wondering where the correlation is breaking down. This was when using
an aggregate device to link two audio interfaces together. But also,
at home with my apogee duet I did a loopback test and saw that
everything was recorded 10 samples or so late. So I'm wondering why
neither setup is precisely synchronized.

It's hard to say. There isn't enough context here. You say everything is "10 samples or so late", but late as compared to what?. And, is it 10 samples all the time? If not, what precisely is the variance?


You need to define better what you are measuring and how you are doing it before I can provide more information.


- Taylor

On Thu, Oct 29, 2009 at 3:09 PM, Jeff Moore <email@hidden> wrote:
Correlating the time of the input and the time of the output is done using
the time stamps that are provided by the various APIs. They provide a time
stamp for when the input data was acquired as well as a time stamp for when
the output data is going to hit the wire. Both time stamps are from the same
time line, so they are already correlated and you can just subtract to get
the number of sample between them.


At any rate, it would help to know what API you are using and probably a bit
more about what you are trying to do to provide any more specific help.



On Oct 29, 2009, at 3:00 PM, Taylor Holliday wrote:

How does a CoreAudio recording app ensure that newly recorded
material (i.e. an overdub) is sample-synchronized with previously
recorded material? Or more specifically: when recording how might one
determine to which output sample a given input sample corresponds?


--

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: synchronization of input and output
      • From: Taylor Holliday <email@hidden>
References: 
 >synchronization of input and output (From: Taylor Holliday <email@hidden>)
 >Re: synchronization of input and output (From: Jeff Moore <email@hidden>)
 >Re: synchronization of input and output (From: Taylor Holliday <email@hidden>)

  • Prev by Date: Re: Source debugging into coreaudio
  • Next by Date: Re: Recording in .wav format doesn't work properly
  • Previous by thread: Re: synchronization of input and output
  • Next by thread: Re: synchronization of input and output
  • Index(es):
    • Date
    • Thread