From the docs
Note that a player should not be stopped from within a completion handler callback because it can deadlock while trying to unschedule previously scheduled buffers.
https://developer.apple.com/documentation/avfoundation/avaudioplayernode?language=objc