Re: When is sample number zero ?
Re: When is sample number zero ?
- Subject: Re: When is sample number zero ?
- From: Jeff Moore <email@hidden>
- Date: Mon, 05 Nov 2001 17:26:27 -0800
on 11/5/01 4:53 PM, James McCartney <email@hidden> wrote:
>
When is sample number zero ?
>
On the first call to my appioproc the sample number time stamps are some
>
small integers, but different each time the program is run. I understand
>
that the start is asynchronous, but why doesn't time start with sample
>
number zero (for either input or output)? What is happening from sample zero
>
until my proc gets to start? Are there zeroes being generated somewhere
>
until then? Or is the first sample I compute really the first sample and the
>
offset is due to some synchronization computed at the time of calling the
>
start function?
The sample time is global to the device and is shared by all processes. It
is reset to 0 when the first process starts the device. It is quite common
for this number to get quite large (bigger than a 32 bit integer can hold).
Just out of curiosity, why do you care when the counter is 0?
I would not use this number for anything other than relative comparisons.
The technique to use is to pick an anchor time and use offsets from that to
schedule everything.
--
Jeff Moore
Core Audio
Apple