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?>) -> OSStatusParameters
- allocator:
Allocator for the new clock; pass Kcfallocatordefault or
NULLto use the default allocator. - deviceUID:
The unique ID of the device for which to create a clock. Pass
NULLto 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.