Re: Sample Rate: 44100 or 48000
Re: Sample Rate: 44100 or 48000
- Subject: Re: Sample Rate: 44100 or 48000
- From: Marc Van Olmen <email@hidden>
- Date: Sun, 14 Aug 2005 11:23:49 -0400
================================
Unrelated question:
Is there a way to poll the audio device for his current time?
why:
I know that my rendercallback gives me the device time. but I was
just wondering if I can poll for the device time with a API call.
Because currently I'm using the Quicktime call back
"ClockGetTime(fVideoOutputClockInstance,&aTimeRecord);" this works
perfect on an Aurora video card. But the Blackmagic video card gives
sometimes results back that are 0.004 seconds off the elapsed time
then taking the CPU timing. 0.004 is a LOT in video. So I'm not sure
that this call works reliable for Decklink cards,
to answer this part of the question my self found some sample code and
created this:
typedef double OS_TimeValue;
AudioTimeStamp theCurrentTime;
OSStatus anError;
theCurrentTime.mHostTime = 0;
theCurrentTime.mRateScalar = 0;
theCurrentTime.mReserved = 0;
theCurrentTime.mSampleTime = 0;
//theCurrentTime.mSMPTETime = 0;
theCurrentTime.mWordClockTime = 0;
theCurrentTime.mFlags = kAudioTimeStampSampleTimeValid |
kAudioTimeStampHostTimeValid;
anError = AudioDeviceGetCurrentTime(fOSMovie->fAudioClockDeviceID,
&theCurrentTime);
pDeviceClock-
>setTime((OS_TimeValue)AudioConvertHostTimeToNanos(theCurrentTime.mHostT
ime),kOS_TimeToNanoSeconds);
to get the right time value from the host...
_______________________________________________
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