iOS: fix concurrency issue in audiocapture