CAClockSetCurrentTime Help
CAClockSetCurrentTime Help
- Subject: CAClockSetCurrentTime Help
- From: Chad Williams <email@hidden>
- Date: Tue, 03 Mar 2009 00:20:33 -0800
- Thread-topic: CAClockSetCurrentTime Help
Thank you for all of the Core Audio postings. They have been extremely
helpful to me. I have a bit of a dilemma. I can't seem to set the
CAClockTime from a SMPTETime. Any help would be great. I am trying to set
the value from NSTextFields. The code compiles with no errors...I just get
"err" when CAClockSetCurrentTime() is called. I have no issues setting the
time from seconds.
OSStatus err;
CAClockTime clockTime;
clockTime.format = kCAClockTimeFormat_SMPTETime;
clockTime.time.smpte.mType = kSMPTETimeType30;
clockTime.time.smpte.mHours = (SInt16)[hhField intValue];
clockTime.time.smpte.mMinutes = (SInt16)[mmField intValue];
clockTime.time.smpte.mSeconds = (SInt16)[ssField intValue];
clockTime.time.smpte.mFrames = (SInt16)[ffField intValue];
clockTime.time.smpte.mSubframeDivisor = 80;
clockTime.time.smpte.mSubframes = 0;
err = CAClockSetCurrentTime(clockRef, &clockTime);
if (err != noErr) {
NSLog(@"setClockToSMPTETime err = %d", err);
}
Thanks, Chad
_______________________________________________
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