Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Microphone access for iOS in Love 12.0 [enhancement] #1912

Open
SugarRayLua opened this issue Mar 19, 2023 · 3 comments
Open

Add Microphone access for iOS in Love 12.0 [enhancement] #1912

SugarRayLua opened this issue Mar 19, 2023 · 3 comments
Labels

Comments

@SugarRayLua
Copy link

Would be great if could add microphone access for Love2D in the future Love 12.0 release. I can tell from love.audio.getRecordingDevices() that Love can already detect an iOS microphone. Thanks for the consideration.

@slime73
Copy link
Member

slime73 commented Mar 19, 2023

If the microphone is detected, which part isn't working for you?

You'll probably need to make sure you have this set in your info.plist if you don't already: https://developer.apple.com/documentation/bundleresources/information_property_list/nsmicrophoneusagedescription

@SugarRayLua
Copy link
Author

Thanks, @slime73. I was helping out test another Love2D developers app that works on his Android Love and Desktop. I am supposed to push a button to start recording but when I do so the Love2D app crashes without an error message. I then tried out the sample code from this Android Love 2D developer's microphone test:
https://love2d.org/forums/viewtopic.php?t=88151, and it also acknowledge that it detected a microphone and was ready to record but then crashed when I released the mouse to record (without generating an error message).

I can try in the future setting the info.plist in my Xcode build of Love 2D iOS; if it wasn't already set up in the Xcode download project then I likely hadn't set it. If that doesn't work, I can write back.

@slime73 slime73 added the iOS label Jun 18, 2023
slime73 added a commit that referenced this issue Jul 22, 2023
It hard-crashes inside the alcCaptureOpenDevice call with Apple's OpenAL implementation.
See #1912.
@slime73
Copy link
Member

slime73 commented Jul 22, 2023

I did some testing. I could get the permission popup to appear when RecordingDevice:start is called by adding that key/value to Info.plist, but it still hard-crashed inside Apple's OpenAL implementation even with that.

It's possible MojoAL (#1764) might allow it to work, I'll see about reevaluating that before 12.0 is done in case it no longer has the bugs it had when I last checked.

That being said, the documentation for love.audio.getRecordingDevices does already say that iOS isn't currently supported.

For 11.5 I've updated it to fail without hard-crashing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants