• 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: When is sample number zero ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: When is sample number zero ?
      • From: andybull <email@hidden>
    • Re: When is sample number zero ?
      • From: James McCartney <email@hidden>
References: 
 >When is sample number zero ? (From: James McCartney <email@hidden>)

  • Prev by Date: When is sample number zero ?
  • Next by Date: Re: When is sample number zero ?
  • Previous by thread: When is sample number zero ?
  • Next by thread: Re: When is sample number zero ?
  • Index(es):
    • Date
    • Thread