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

AudioEffectRecord returns all zero samples on iOS #30308

Closed
ArdaE opened this issue Jul 4, 2019 · 5 comments
Closed

AudioEffectRecord returns all zero samples on iOS #30308

ArdaE opened this issue Jul 4, 2019 · 5 comments

Comments

@ArdaE
Copy link
Contributor

ArdaE commented Jul 4, 2019

Godot version:
3.1

OS/device including version:
iOS 12.3.1, iPhone 6s Plus
(code exported via macOS 10.14.5)

Issue description:
Audio recorded via the AudioEffectRecord effect contains all zero samples. While the number of samples seem to relate to the length of the recording, all samples are zero.

Steps to reproduce:
Try exporting the official microphone recording demo (see "Minimal reproduction project below") to iOS. Note that it doesn't function as it does on other platforms. Further, if you scan the recorded audio samples for non-zero values, you'll find that no non-zero value exists (the recorded samples can be accessed via the data variable in the _on_PlayButton_pressed function.

Minimal reproduction project:
https://github.com/godotengine/godot-demo-projects/tree/master/audio/mic_record

Related issues/pull requests:
#19106

@akien-mga
Copy link
Member

CC @marcelofg55

@ArdaE
Copy link
Contributor Author

ArdaE commented Jul 4, 2019

Forgot to add: Either #30307 must be fixed or NSMicrophoneUsageDescription must be manually added to the app's x-Info.plist before this issue can be addressed. While one cannot expect microphone recording to work on iOS without NSMicrophoneUsageDescription, the problem I describe in this entry exists even after NSMicrophoneUsageDescription is added and the permission to use the microphone is granted by the user.

@DomoKB
Copy link

DomoKB commented Aug 25, 2019

I can confirm this is happening on Android as well. All the data in AudioStreamSample are zeros. Should I open a separate issue?

@akien-mga
Copy link
Member

Closing as duplicate of #33885 which has some additional debugging info.
Note that the permission issue is fixed in 3.2 RC 1, but as mentioned above it doesn't seem sufficient.

@audiosdroid
Copy link

audiosdroid commented Jun 7, 2022

We developed an iOS Audio Godot plugin named AudiosPlugin that solves this issue. Please see our GitHub repo:
https://github.com/audiosdev/AudiosPlugin-Godot-iOS-Audio-Plugin/

@audiosdev
Copy link

I developed a Godot iOS plugin that solves the Godot audio recording issue and playback issue in iOS devices. Please see the GitHub repo:

https://github.com/audiosdev/AudiosPlugin-Godot-iOS-Audio-Plugin/

Thanks!

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

No branches or pull requests

5 participants