Freezes on Macbook M1 because coreaudiod errors

Hello! I have freezes when playing. Its freezes like when changing audio device.

I got tracelog with XCode instruments and realize this because coreaudiod errors:

Timestamp	Type	Process	Subsystem	Category	Message	
01:17.592.428	Error	Heroes (3716)	CoreAudio	Default	HALB_MachPort.cpp:174  HALB_MachPort::DestroyPort: not going to destroy anything this way	
01:17.643.854	Error	Heroes (3716)	CoreAudio	Default	HALB_MachPort.cpp:174  HALB_MachPort::DestroyPort: not going to destroy anything this way	
01:17.690.109	Error	Heroes (3716)	CoreAudio	Default	HALB_MachPort.cpp:174  HALB_MachPort::DestroyPort: not going to destroy anything this way	

Full error tracelog: https://pastebin.com/raw/pCSPAcqj
Full tracelog: https://pastebin.com/raw/7num9VkV

-–––––––––

Update1

Hello guys! I discovered why it happens. It because my iPhone was used by default as “Continuity Camera”. I guess it updates audio settings state sometimes. So I disabled it in “General → AirPlay & Handoff → Continuity Camera” and now all works without freezes.

Alternative way – disable WiFi on your iPhone.