Re: Coreaudio-api Digest, Vol 6, Issue 186
Re: Coreaudio-api Digest, Vol 6, Issue 186
- Subject: Re: Coreaudio-api Digest, Vol 6, Issue 186
- From: Doug Wyatt <email@hidden>
- Date: Thu, 7 May 2009 07:33:59 -0700
Bill,
Sorry, we can't discuss beta software on this list. You can however
write a bug.
Doug
On May 6, 2009, at 18:26 , bill luoma wrote:
Hello,
I've noticed some behavioral differences between
AudioQueueStart on iPhone OS 2.2.1 and iPhoneOS 3.0 beta 4
when passing in an AudioTimeStamp populated with a future absolute
host time.
Basically it works well (starts after the intended delay) on 2.2
but fails to work as expected on 3.0 beta 4 (it starts immediately,
often hopping many frames into the track).
The "indended delays" are on the order of 500 ms.
Manually increasing the delay to, say,
mach_absolute_time + 5 seconds has no effect.
It still starts immediately on 3.0 beta 4.
Simulator and device exhibit the same behavior.
Can anyone shed any light on this?
The code i'm using looks like this:
- (void)runPlayAtHostTime:(NSNumber*)numHostTime
{
DLog(@"player: %d runPlayAtHostTime thread: %@", playerID,
[NSThread currentThread]);
UInt64 hostTime = [numHostTime unsignedLongLongValue];
self.startingPacketNumber = 0;
[self primeBuffers]; //this manually invokes the
AudioQueueOutputCallback
AudioTimeStamp tsIn = {0};
tsIn.mHostTime = hostTime;
tsIn.mFlags = kAudioTimeStampHostTimeValid;
SInt64 sTimeDiff = [self.timeUtils
hostDeltaToMillisFrom:mach_absolute_time() to:tsIn.mHostTime];
DLog(@"player: %d startHostTime: %llu, diffFromNow: %lld ms",
playerID, tsIn.mHostTime, sTimeDiff);
OSStatus err = AudioQueueStart(audioQueue, &tsIn);
if (err) {
DLog(@"err starting audioQueue: %d", err);
}
}
thanks,
bill luoma
_______________________________________________
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