From 7706ac7ba9f02e3d301e2b21183773d18f27ea7f Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sat, 22 Jul 2023 15:24:10 -0300 Subject: [PATCH] iOS: don't try to open audio recording devices for capture. It hard-crashes inside the alcCaptureOpenDevice call with Apple's OpenAL implementation. See #1912. --- src/modules/audio/openal/RecordingDevice.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/audio/openal/RecordingDevice.cpp b/src/modules/audio/openal/RecordingDevice.cpp index 9e61c1fcf..6b6c86326 100644 --- a/src/modules/audio/openal/RecordingDevice.cpp +++ b/src/modules/audio/openal/RecordingDevice.cpp @@ -67,7 +67,11 @@ bool RecordingDevice::start(int samples, int sampleRate, int bitDepth, int chann if (isRecording()) stop(); + // This hard-crashes on iOS with Apple's OpenAL implementation, even when + // the user gives permission to the app. +#ifndef LOVE_IOS device = alcCaptureOpenDevice(name.c_str(), sampleRate, format, samples); +#endif if (device == nullptr) return false;