| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
- Are the two Callbacks 1a and 1b always guaranteed to be called
exactly alternating i-o-i-o-i-o-i-o... if running in one thread?
Absolutely not. While they will for the most part stay in the order
that they initially are called, the threads are working for two
different devices and as such have totally different time lines. They
can easily drift to the point where the order of calling can be
inverted. Plus, if their duty cycles dictate that they are to wake up
at times that are close together, the order of operations will be
essentially random each time.
This is why I talked about using AudioDeviceStartAtTime(). It doesn't
cure the drift problem, but it does give you the ability to phase the
threads in the order in which you want them, with the approximate
timing you want.
Will this "complexity" when handling USB devices be improved in Tiger? I read somewhere that Tiger will provide ways to synchronize several audio devices an allows to see them as on "unique" device.
Since this question about USB devices comes regularly, it seems that it would be a big improvement if the coreaudio layer could take this two devices question and solve it once for all developers, so that using an USB device would be similar to using other full-duplex ones.
| References: | |
| >Re: in & out Callbacks (From: Stéphane Letz <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.