Enumerations



CAClockPropertyID


The properties of a CoreAudioClock, accessible via CAClockGetProperty and CAClockSetProperty.

enum { // typedef UInt32 CAClockPropertyID; 
    kCAClockProperty_InternalTimebase = 'intb', 
    kCAClockProperty_TimebaseSource = 'itbs', 
    kCAClockProperty_SyncMode = 'synm', 
    kCAClockProperty_SyncSource = 'syns', 
    kCAClockProperty_SMPTEFormat = 'smpf', 
    kCAClockProperty_SMPTEOffset = 'smpo', 
    kCAClockProperty_MIDIClockDestinations = 'mbcd', 
    kCAClockProperty_MTCDestinations = 'mtcd', 
    kCAClockProperty_MTCFreewheelTime = 'mtfw', 
    kCAClockProperty_TempoMap = 'tmpo', 
    kCAClockProperty_MeterTrack = 'metr', 
    kCAClockProperty_Name = 'name' 
}; 
Constants
kCAClockProperty_InternalTimebase
Type: CAClockTimebase. Selects the internal time reference for the clock (currently, host time, an audio device, or audio output unit).
kCAClockProperty_TimebaseSource
Type: according to the internal timebase. If the timebase is kCAClockTimebase_AudioDevice, the value is an AudioDeviceID. For kCAClockTimebase_AudioOutputUnit, the value is an AudioUnit.
kCAClockProperty_SyncMode
Type: CAClockSyncMode. Selects between internal synchronization and multiple external synchronization modes such as MIDI Time Code and MIDI beat clock.
kCAClockProperty_SyncSource
Type: according to the sync mode. For kCAClockSyncMode, the value is a MIDIEndpointRef.
kCAClockProperty_SMPTEFormat
Type: CAClockSMPTEFormat. Specifies the SMPTE format (fps, drop or non-drop) expected for received SMPTE messages, and used for transmitted SMPTE messages and SMPTE time representations.
kCAClockProperty_SMPTEOffset
Type: CAClockSeconds. The SMPTE time, represented in seconds since 00:00:00:00, corresponding to a timeline position of 0 seconds.
kCAClockProperty_MIDIClockDestinations
Type: array of MIDIEndpointRef. When non-empty, the clock will transmit MIDI beat clock to the MIDI endpoints in this list.
kCAClockProperty_MTCDestinations
Type: array of MIDIEndpointRef. When non-empty, the clock will transmit MIDI Time Code to the MIDI endpoints in this list.
kCAClockProperty_MTCFreewheelTime
Type: CAClockSeconds. When the sync mode is MIDI Time Code, this controls how long the reader will keep running after the last MTC message is received before stopping (default: 1 sec). Should be at least ~4 SMPTE frames in duration.
kCAClockProperty_TempoMap
Type: array of CATempoMapEntry. Specifies a tempo map for the clock, defining the relationship between timeline positions in seconds and musical beats. Defaults to a constant tempo of 120 bpm.
kCAClockProperty_MeterTrack
Type: array of CAMeterTrackEntry. Specifies the positions of musical time signature changes in the timeline. Used only for converting between beats and CABarBeatTime's (a display representaiton of a beat time).
kCAClockProperty_Name
Type: CFStringRef. Sets a name for the clock. When a client sets the property, the clock retains a reference to the string. When a client gets the property, it receives a borrowed reference (i.e. the client must not release the string).
Discussion




CAClockTimebase


The available internal hardware time references for a clock.

enum { // typedef UInt32 CAClockTimebase; 
    kCAClockTimebase_HostTime = 'host', 
    kCAClockTimebase_AudioDevice = 'audi', 
    kCAClockTimebase_AudioOutputUnit = 'auou' 
}; 
Constants
kCAClockTimebase_HostTime
The clock's reference time is host time (as returned by mach_absolute_time() or HostTime()).
kCAClockTimebase_AudioDevice
The clock's reference time is derived from an audio device.
kCAClockTimebase_AudioOutputUnit
The clock's reference time is derived from the audio device addressed by an output Audio Unit.
Discussion




CAClockSyncMode


Specifies internal synchronization, or an external sync source type.

enum { // typedef UInt32 CAClockSyncMode; 
    kCAClockSyncMode_Internal = 'intr', // sync to the internal timebase 
    kCAClockSyncMode_MIDIClockTransport = 'mclk', // sync to MIDI beat clock, external transport 
    kCAClockSyncMode_MTCTransport = 'mmtc' // sync to MIDI Time Code, external transport 
}; 
Constants
kCAClockSyncMode_Internal
The clock is not driven by an external sync source.
kCAClockSyncMode_MIDIClockTransport
The clock is driven by MIDI beat clock received from a CoreMIDI source endpoint.
kCAClockSyncMode_MTCTransport
The clock is driven by MIDI Time Code received from a CoreMIDI source endpoint.
Discussion




CAClockMessage


The messages sent to a CAClockListenerProc to notify the client of changes to the clock's state.

enum { // typedef UInt32 CAClockMessage; 
    kCAClockMessage_StartTimeSet = 'stim', 
    kCAClockMessage_Started = 'strt', 
    kCAClockMessage_Stopped = 'stop', 
    kCAClockMessage_Armed = 'armd', 
    kCAClockMessage_Disarmed = 'darm', 
    kCAClockMessage_PropertyChanged = 'pchg', 
    kCAClockMessage_WrongSMPTEFormat = '?smp' 
}; 
Constants
kCAClockMessage_StartTimeSet
A new start time was set or received from an external sync source.
kCAClockMessage_Started
The clock's time has started moving.
kCAClockMessage_Stopped
The clock's time has stopped moving.
kCAClockMessage_Armed
The client has called CAClockArm().
kCAClockMessage_Disarmed
The client has called CAClockDisarm().
kCAClockMessage_PropertyChanged
A clock property has been changed.
kCAClockMessage_WrongSMPTEFormat
The clock is receiving SMPTE (MTC) messages in a SMPTE format that does not match the clock's SMPTE format.

CAClockTimeFormat


The various units in which a clock can represent and report time.

enum { // typedef UInt32 CAClockTimeFormat; 
    kCAClockTimeFormat_HostTime = 'host', 
    kCAClockTimeFormat_Samples = 'samp', 
    kCAClockTimeFormat_Beats = 'beat', // relative position on media timeline 
    kCAClockTimeFormat_Seconds = 'secs', // relative position on media timeline 
    kCAClockTimeFormat_SMPTESeconds = 'smps', // absolute SMPTE position in seconds 
    kCAClockTimeFormat_SMPTETime = 'smpt' // SMPTETime structure 
}; 
Constants
kCAClockTimeFormat_HostTime
Absolute host time, as returned by mach_absolute_time().
kCAClockTimeFormat_Samples
Absolute audio samples, as a Float64. Available when the internal timebase is an audio device (or audio output unit). The units are in arbitrary sample numbers, corresponding to the audio device's current time, and at the device's current sample rate.
kCAClockTimeFormat_Beats
Musical beats, as a Float64. This is a position on the clock's timeline.
kCAClockTimeFormat_Seconds
Seconds, as a Float64. This is a position on the clock's timeline.
kCAClockTimeFormat_SMPTESeconds
Seconds, as a Float64. This is the same as kCAClockTimeFormat_Seconds, except that the clock's SMPTE offset has been applied.
kCAClockTimeFormat_SMPTETime
SMPTETime structure.

(Last Updated July 18, 2005)