Re: AudioDeviceGetCurrentTime fixed when?
Re: AudioDeviceGetCurrentTime fixed when?
- Subject: Re: AudioDeviceGetCurrentTime fixed when?
- From: Steve Checkoway <email@hidden>
- Date: Fri, 28 Oct 2005 16:19:00 -0700
Jeff Moore wrote:
On Oct 27, 2005, at 8:54 PM, Steve Checkoway wrote:
I know that the bug where AudioDeviceGetCurrentTime could return a
time in the past was fixed in 10.4. Was this fix backported to any
earlier OS X versions, via quicktime updates for example?
As far as I can tell, the fix is only in Tiger.
That's too bad.
Would this code trigger the same bug?
If you make the calls under the same circumstances you reported in the
bug, you will get the same bug. The HAL's clock code is all inter- related.
I figured as much but I hoped I was wrong.
If so, is there another way to get the current time as (should be)
returned by AudioDeviceGetCurrentTime()?
Not without the bug fix in the HAL. (The problem turned out to be a
re-entrancy issue in the HAL's clock code.)
You can wrap your calls to AudioDeviceGetCurrentTime() that checks for
the problem and just returns whatever makes sense. Although you have to
be careful about threading issues when you do that. You either need to
use a mutex to protect the last time stamp or keep the last time stamp
for each thread separately. Otherwise you will have interference on MP
machines as I found when I was fixing this bug in the HAL =)
Okay. Thanks for the info.
- Steve
_______________________________________________
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