I am using SimplyCoreAudio to switch the clock source. The code is as follows:
debugPrint("nullAudioDevice.clockSourceID \(nullAudioDevice.clockSourceID)")
if let cid = hardwareDevice.clockSourceID {
if nullAudioDevice.setClockSourceID(cid) {
debugPrint("hardwareDevice.clockSourceID \(hardwareDevice.clockSourceID)")
debugPrint("nullAudioDevice.clockSourceID \(nullAudioDevice.clockSourceID)")
}else{
debugPrint("false")
}
}
The printed result is as follows:
nullAudioDevice.clockSourceID Optional(4294967295)
hardwareDevice.clockSourceID Optional(690487296)
nullAudioDevice.clockSourceID Optional(4294967295)
Why does the ID returned after successfully setting the clock source with setClockSourceID still show the original one? Does this mean the setting was not successful? Is there a proper method to synchronize the clock source setting?