Hi all,
Sorry if this is a nub question. I'm attempting to create an object that will handle incoming SMPTE (LTC) timecode on a device like an 828mkII. I'm approaching this by setting the device's kAudioDevicePropertyClockSource to the clock source labeled "SMPTE" (I'm doing it by label, since I can't access kAudioDevicePropertyClockSourceKindForID; it always returns 'who?'), and then I attach an IOProc and start the device. So far, so good. Looking at the 828 console, the clock source has definitely been set to SMPTE, and the light on the 828 tells me it's receiving LTC. But my IOProc isn't seeing it in the timestamps.
Am I misunderstanding this? Is inInputTime->mSMPTETime not supposed to be the incoming SMPTE time? I can't find any documentation that suggests otherwise. Is there something else I have to do to coax it out? Or am I chasing the proverbial wild goose? Here's the relevant part of my IOProc:
OSStatus HALIOProc ( AudioDeviceID inDevice, const AudioTimeStamp* inNow, const AudioBufferList* inInputData, const AudioTimeStamp* inInputTime, AudioBufferList* outOutputData, const AudioTimeStamp* inOutputTime, void* inClientData) { SMPTETime mySMPTE = inInputTime->mSMPTETime; printf("%d:d:d:d (%d)\n", mySMPTE.mHours, mySMPTE.mMinutes, mySMPTE.mSeconds, mySMPTE.mFrames, inInputTime->mFlags); // ...fill in outOutputData with silence... return 0; }
All I get is "0:00:00:00 (7)". i.e. SMPTE neither valid nor running. Might anyone have any insight?
Thanks! Sean Dougall |