Contents

CMAudioDeviceClockCreate(allocator:deviceUID:clockOut:)

Creates a clock that tracks playback through a Core Audio device with the specified unique identifier.

Declaration

func CMAudioDeviceClockCreate(allocator: CFAllocator?, deviceUID: CFString?, clockOut: UnsafeMutablePointer<CMClock?>) -> OSStatus

Parameters

  • allocator:

    Allocator for the new clock; pass Kcfallocatordefault or NULL to use the default allocator.

  • deviceUID:

    The unique ID of the device for which to create a clock. Pass NULL to create a clock that tracks the default device.

  • clockOut:

    Upon return, a pointer to the newly created clock.

Discussion

When the associated device is completely stopped, the clock continues to advance, tracking CMClockGetHostTimeClock() until the audio device starts up again.

See Also

Creating Audio Clocks