Re: Matching input and output signals
Re: Matching input and output signals
- Subject: Re: Matching input and output signals
- From: Jeff Moore <email@hidden>
- Date: Mon, 20 Sep 2004 14:35:25 -0700
Your technique is pretty much correct. To predict the input time of a
sample traveling from the output looped back to the input of the same
device, you just take the output time stamp and add the sum of the two
latency figures.
If you are going out one device and back in a completely different
device, you're going to have to do a little more work since you'll need
to translate between the two time lines to get the numbers you need.
On Sep 20, 2004, at 12:42 PM, Chris Liscio wrote:
Hello all,
I'm working on an application that sends an excitation signal through
an output device, and records the result of that excitation on the
input device. I would like to know what the best method is for
ensuring that my output sample is lined up exactly with the input
sample, so that I may compare the two. Note that by "lined up" I mean
that if the excitation goes out at t=0, I want to know the frame where
I'll find the t=0 sample on the input.
In some devices that will be tested by my software (a loudspeaker, or
a mixing room), there may be a sizeable delay between the sound
exiting the output device, and the sound hitting the receiving device.
This is fine, since I would like to capture this delay accurately
anyway. Thus, I'm not simply looking for a solution that involves
setting a threshold for the input device, and waiting to be triggered
on the input side.
My method for doing so right now involves querying the latency (in
frames -- kAudioDevicePropertyLatency) of the input and output
devices, summing them together, and using that value as an offset into
the input sample stream to match them up. I'm not convinced that this
is the best method for ensuring that the two streams match up.
Does anyone out there know of a better way to do the above? Also, if
my current method is correct, please let me know so that I can sleep
better at night. ;)
Any help would be greatly appreciated.
Cheers,
Chris
http://www.supermegaultragroovy.com
_______________________________________________
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
--
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