() -> Void { // Assumed to be executed on MyActor's context { [self] in value = value + 1 } } var sendableBlock: @Sendable () -> Void { // Cannot touch MyActor's property synchronously { /* [self] in value = value + 1 */ } } } એݴɾΫϩʔδϟʔͱ"DUPSDPOUFYU
var sourceNode: AVAudioSourceNode { AVAudioSourceNode { [self] _, _, frameCount, outputPointer in guard let outputBuffer = outputPointer.pointee.mBuffers.mData? .assumingMemoryBound(to: Float.self) else { return kAudioUnitErr_Uninitialized } for index in 0..<Int(frameCount) { outputBuffer[index] = sin(phase) // Set the amplitude phase += 2 * .pi * frequency / sampleRate // Increment phase } return noErr } } } Actor-isolated property 'phase' can not be referenced from a nonisolated context