refactor MicrophoneEncoder. Prepare off main thread